diff options
Diffstat (limited to 'ethchain/block.go')
-rw-r--r-- | ethchain/block.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ethchain/block.go b/ethchain/block.go index 157be2a52..5e8aca33a 100644 --- a/ethchain/block.go +++ b/ethchain/block.go @@ -18,6 +18,7 @@ type BlockInfo struct { Number uint64 Hash []byte Parent []byte + TD *big.Int } func (bi *BlockInfo) RlpDecode(data []byte) { @@ -26,10 +27,11 @@ func (bi *BlockInfo) RlpDecode(data []byte) { bi.Number = decoder.Get(0).Uint() bi.Hash = decoder.Get(1).Bytes() bi.Parent = decoder.Get(2).Bytes() + bi.TD = decoder.Get(3).BigInt() } func (bi *BlockInfo) RlpEncode() []byte { - return ethutil.Encode([]interface{}{bi.Number, bi.Hash, bi.Parent}) + return ethutil.Encode([]interface{}{bi.Number, bi.Hash, bi.Parent, bi.TD}) } type Blocks []*Block |