aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/api/parsing.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-09-11 23:10:37 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-09-11 23:10:37 +0800
commit0eac601b5b67ce15201901710fd6be089ccb8b6e (patch)
tree2dfb3b7365895203132bd6d1aa650b5a239b01eb /rpc/api/parsing.go
parent4e075e401354b4ee068cf78b1f283763fe927245 (diff)
parentcdc2662c4098d68a7b450b9b9ff2688acbffcee4 (diff)
downloaddexon-0eac601b5b67ce15201901710fd6be089ccb8b6e.tar
dexon-0eac601b5b67ce15201901710fd6be089ccb8b6e.tar.gz
dexon-0eac601b5b67ce15201901710fd6be089ccb8b6e.tar.bz2
dexon-0eac601b5b67ce15201901710fd6be089ccb8b6e.tar.lz
dexon-0eac601b5b67ce15201901710fd6be089ccb8b6e.tar.xz
dexon-0eac601b5b67ce15201901710fd6be089ccb8b6e.tar.zst
dexon-0eac601b5b67ce15201901710fd6be089ccb8b6e.zip
Merge pull request #1779 from karalabe/split-block-storage-3000
core: split the db blocks into components, move TD out top level
Diffstat (limited to 'rpc/api/parsing.go')
-rw-r--r--rpc/api/parsing.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/rpc/api/parsing.go b/rpc/api/parsing.go
index 5858bc136..cdfaa0ed1 100644
--- a/rpc/api/parsing.go
+++ b/rpc/api/parsing.go
@@ -281,7 +281,7 @@ func (b *BlockRes) MarshalJSON() ([]byte, error) {
}
}
-func NewBlockRes(block *types.Block, fullTx bool) *BlockRes {
+func NewBlockRes(block *types.Block, td *big.Int, fullTx bool) *BlockRes {
if block == nil {
return nil
}
@@ -299,7 +299,7 @@ func NewBlockRes(block *types.Block, fullTx bool) *BlockRes {
res.ReceiptRoot = newHexData(block.ReceiptHash())
res.Miner = newHexData(block.Coinbase())
res.Difficulty = newHexNum(block.Difficulty())
- res.TotalDifficulty = newHexNum(block.Td)
+ res.TotalDifficulty = newHexNum(td)
res.Size = newHexNum(block.Size().Int64())
res.ExtraData = newHexData(block.Extra())
res.GasLimit = newHexNum(block.GasLimit())