diff options
author | obscuren <geffobscura@gmail.com> | 2014-11-14 01:12:12 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-11-14 01:12:12 +0800 |
commit | 20d518ee959f1621a5accf1f3432282a6c0d6c3c (patch) | |
tree | c1c9dcd1e2ced349d11edeca7d2ef179b092fc9b /chain/block_manager.go | |
parent | 60cdb1148c404218846fd39331690658168f4e04 (diff) | |
download | dexon-20d518ee959f1621a5accf1f3432282a6c0d6c3c.tar.gz dexon-20d518ee959f1621a5accf1f3432282a6c0d6c3c.tar.zst dexon-20d518ee959f1621a5accf1f3432282a6c0d6c3c.zip |
Numerous fixes for consensus.
* Removed (buged) C++ specific gas specification for LOG*
* Fixed LOG* where mstart went after msize
*
Diffstat (limited to 'chain/block_manager.go')
-rw-r--r-- | chain/block_manager.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/chain/block_manager.go b/chain/block_manager.go index a1c75fd93..730a44e7b 100644 --- a/chain/block_manager.go +++ b/chain/block_manager.go @@ -161,7 +161,6 @@ done: cumulative := new(big.Int).Set(totalUsedGas.Add(totalUsedGas, txGas)) bloom := ethutil.LeftPadBytes(LogsBloom(state.Logs()).Bytes(), 64) receipt := &Receipt{ethutil.CopyBytes(state.Root()), cumulative, bloom, state.Logs()} - fmt.Println(receipt) // Notify all subscribers go self.eth.EventMux().Post(TxPostEvent{tx}) @@ -215,7 +214,6 @@ func (sm *BlockManager) ProcessWithParent(block, parent *Block) (td *big.Int, me if err != nil { return } - //block.SetReceipts(receipts) txSha := DeriveSha(block.transactions) if bytes.Compare(txSha, block.TxSha) != 0 { @@ -240,8 +238,10 @@ func (sm *BlockManager) ProcessWithParent(block, parent *Block) (td *big.Int, me return } - if bytes.Compare(CreateBloom(block), block.LogsBloom) != 0 { - err = errors.New("Unable to replicate block's bloom") + block.SetReceipts(receipts) + rbloom := CreateBloom(block) + if bytes.Compare(rbloom, block.LogsBloom) != 0 { + err = fmt.Errorf("unable to replicate block's bloom: %x", rbloom) return } |