From 20d518ee959f1621a5accf1f3432282a6c0d6c3c Mon Sep 17 00:00:00 2001 From: obscuren Date: Thu, 13 Nov 2014 18:12:12 +0100 Subject: Numerous fixes for consensus. * Removed (buged) C++ specific gas specification for LOG* * Fixed LOG* where mstart went after msize * --- chain/block_manager.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'chain/block_manager.go') 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 } -- cgit