aboutsummaryrefslogtreecommitdiffstats
path: root/core/block_manager.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-12-05 06:54:07 +0800
committerobscuren <geffobscura@gmail.com>2014-12-05 06:54:07 +0800
commit8dbca75d85553f2d9451ee563a919850f05ea1dd (patch)
tree31fbd960506f216eb0c0dc394b1ce7b4014210d5 /core/block_manager.go
parent3db9c8007086e0735695a6477c21056737519db9 (diff)
downloadgo-tangerine-8dbca75d85553f2d9451ee563a919850f05ea1dd.tar
go-tangerine-8dbca75d85553f2d9451ee563a919850f05ea1dd.tar.gz
go-tangerine-8dbca75d85553f2d9451ee563a919850f05ea1dd.tar.bz2
go-tangerine-8dbca75d85553f2d9451ee563a919850f05ea1dd.tar.lz
go-tangerine-8dbca75d85553f2d9451ee563a919850f05ea1dd.tar.xz
go-tangerine-8dbca75d85553f2d9451ee563a919850f05ea1dd.tar.zst
go-tangerine-8dbca75d85553f2d9451ee563a919850f05ea1dd.zip
Skip mining on transactions that don't meet the min accepted gas price
Diffstat (limited to 'core/block_manager.go')
-rw-r--r--core/block_manager.go28
1 files changed, 12 insertions, 16 deletions
diff --git a/core/block_manager.go b/core/block_manager.go
index b648166ec..909f26a1b 100644
--- a/core/block_manager.go
+++ b/core/block_manager.go
@@ -231,7 +231,7 @@ func (sm *BlockManager) ProcessWithParent(block, parent *types.Block) (td *big.I
return
}
- _, err = sm.TransitionState(state, parent, block)
+ receipts, err := sm.TransitionState(state, parent, block)
if err != nil {
return
}
@@ -242,26 +242,22 @@ func (sm *BlockManager) ProcessWithParent(block, parent *types.Block) (td *big.I
return
}
- /*
- receiptSha := types.DeriveSha(receipts)
- if bytes.Compare(receiptSha, block.ReceiptSha) != 0 {
- err = fmt.Errorf("validating receipt root. received=%x got=%x", block.ReceiptSha, receiptSha)
- return
- }
- */
+ receiptSha := types.DeriveSha(receipts)
+ if bytes.Compare(receiptSha, block.ReceiptSha) != 0 {
+ err = fmt.Errorf("validating receipt root. received=%x got=%x", block.ReceiptSha, receiptSha)
+ return
+ }
if err = sm.AccumelateRewards(state, block, parent); err != nil {
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
- }
- */
+ //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)