diff options
author | obscuren <geffobscura@gmail.com> | 2015-04-06 00:57:03 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-04-06 00:59:18 +0800 |
commit | 9c55576c7b415954773c062d404a736741fb9794 (patch) | |
tree | 5c79551e6ad55d88c02fbe3374ebc9738b863f8d /core/types/block.go | |
parent | 3040296beb3a8ca991b738a83df0af7bddde2ac6 (diff) | |
download | dexon-9c55576c7b415954773c062d404a736741fb9794.tar dexon-9c55576c7b415954773c062d404a736741fb9794.tar.gz dexon-9c55576c7b415954773c062d404a736741fb9794.tar.bz2 dexon-9c55576c7b415954773c062d404a736741fb9794.tar.lz dexon-9c55576c7b415954773c062d404a736741fb9794.tar.xz dexon-9c55576c7b415954773c062d404a736741fb9794.tar.zst dexon-9c55576c7b415954773c062d404a736741fb9794.zip |
Block header changed & console miner control
* miner control moved to `admin.miner`
* miner option to set extra data
* block extra now bytes
Diffstat (limited to 'core/types/block.go')
-rw-r--r-- | core/types/block.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/types/block.go b/core/types/block.go index d5cd8a21e..116acbf79 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -39,7 +39,7 @@ type Header struct { // Creation time Time uint64 // Extra data - Extra string + Extra []byte // Mix digest for quick checking to prevent DOS MixDigest common.Hash // Nonce @@ -121,7 +121,7 @@ type storageblock struct { TD *big.Int } -func NewBlock(parentHash common.Hash, coinbase common.Address, root common.Hash, difficulty *big.Int, nonce uint64, extra string) *Block { +func NewBlock(parentHash common.Hash, coinbase common.Address, root common.Hash, difficulty *big.Int, nonce uint64, extra []byte) *Block { header := &Header{ Root: root, ParentHash: parentHash, @@ -371,7 +371,7 @@ func (self *Header) String() string { GasLimit: %v GasUsed: %v Time: %v - Extra: %v + Extra: %s MixDigest: %x Nonce: %x`, self.ParentHash, self.UncleHash, self.Coinbase, self.Root, self.TxHash, self.ReceiptHash, self.Bloom, self.Difficulty, self.Number, self.GasLimit, self.GasUsed, self.Time, self.Extra, self.MixDigest, self.Nonce) |