Numerous fixes for consensus.

* Removed (buged) C++ specific gas specification for LOG*
* Fixed LOG* where mstart went after msize
*
This commit is contained in:
obscuren
2014-11-13 18:12:12 +01:00
parent 60cdb1148c
commit 20d518ee95
8 changed files with 48 additions and 14 deletions

View File

@ -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
}