diff options
author | obscuren <geffobscura@gmail.com> | 2014-12-23 21:33:15 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-12-23 21:33:15 +0800 |
commit | 9e5257b83b8572077b9c26e4ae9a9443f765bf6e (patch) | |
tree | f94a123cb02af8cebecef263290b0378cf3d78ac /core/types/block.go | |
parent | 4cd79d8ddd7608d60344b13fe4bda7315429d1d9 (diff) | |
download | dexon-9e5257b83b8572077b9c26e4ae9a9443f765bf6e.tar dexon-9e5257b83b8572077b9c26e4ae9a9443f765bf6e.tar.gz dexon-9e5257b83b8572077b9c26e4ae9a9443f765bf6e.tar.bz2 dexon-9e5257b83b8572077b9c26e4ae9a9443f765bf6e.tar.lz dexon-9e5257b83b8572077b9c26e4ae9a9443f765bf6e.tar.xz dexon-9e5257b83b8572077b9c26e4ae9a9443f765bf6e.tar.zst dexon-9e5257b83b8572077b9c26e4ae9a9443f765bf6e.zip |
Chain importer
Diffstat (limited to 'core/types/block.go')
-rw-r--r-- | core/types/block.go | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/core/types/block.go b/core/types/block.go index b0fcbdd9b..940f2402e 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -209,28 +209,34 @@ func (self *Block) HashNoNonce() []byte { func (self *Block) String() string { return fmt.Sprintf(`BLOCK(%x): Size: %v { +Header: +[ %v +] +Transactions: %v +Uncles: %v } -`, self.header.Hash(), self.Size(), self.header, self.uncles, self.transactions) +`, self.header.Hash(), self.Size(), self.header, self.transactions, self.uncles) } func (self *Header) String() string { - return fmt.Sprintf(`ParentHash: %x -UncleHash: %x -Coinbase: %x -Root: %x -TxSha %x -ReceiptSha: %x -Bloom: %x -Difficulty: %v -Number: %v -GasLimit: %v -GasUsed: %v -Time: %v -Extra: %v -Nonce: %x + return fmt.Sprintf(` + ParentHash: %x + UncleHash: %x + Coinbase: %x + Root: %x + TxSha %x + ReceiptSha: %x + Bloom: %x + Difficulty: %v + Number: %v + GasLimit: %v + GasUsed: %v + Time: %v + Extra: %v + 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.Nonce) } |