aboutsummaryrefslogtreecommitdiffstats
path: root/core/block_manager.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/block_manager.go')
-rw-r--r--core/block_manager.go13
1 files changed, 6 insertions, 7 deletions
diff --git a/core/block_manager.go b/core/block_manager.go
index 909f26a1b..4c1cea35a 100644
--- a/core/block_manager.go
+++ b/core/block_manager.go
@@ -236,6 +236,12 @@ func (sm *BlockManager) ProcessWithParent(block, parent *types.Block) (td *big.I
return
}
+ rbloom := types.CreateBloom(receipts)
+ if bytes.Compare(rbloom, block.LogsBloom) != 0 {
+ err = fmt.Errorf("unable to replicate block's bloom=%x", rbloom)
+ return
+ }
+
txSha := types.DeriveSha(block.Transactions())
if bytes.Compare(txSha, block.TxSha) != 0 {
err = fmt.Errorf("validating transaction root. received=%x got=%x", block.TxSha, txSha)
@@ -252,13 +258,6 @@ func (sm *BlockManager) ProcessWithParent(block, parent *types.Block) (td *big.I
return
}
- //block.receipts = receipts // although this isn't necessary it be in the future
- rbloom := types.CreateBloom(receipts)
- if bytes.Compare(rbloom, block.LogsBloom) != 0 {
- err = fmt.Errorf("unable to replicate block's bloom=%x", rbloom)
- return
- }
-
state.Update(ethutil.Big0)
if !block.State().Cmp(state) {