Fixes for PV41/42

* Don't expand mem on empty value
* Removed all coinbase logs for PV42
* Removed C++ bug stuff for LOG*
This commit is contained in:
obscuren
2014-11-14 13:47:12 +01:00
parent 20d518ee95
commit f6e55962a8
7 changed files with 34 additions and 29 deletions

View File

@@ -217,13 +217,13 @@ func (sm *BlockManager) ProcessWithParent(block, parent *Block) (td *big.Int, me
txSha := DeriveSha(block.transactions)
if bytes.Compare(txSha, block.TxSha) != 0 {
err = fmt.Errorf("Error validating transaction sha. Received %x, got %x", block.TxSha, txSha)
err = fmt.Errorf("Error validating transaction root. Received %x, got %x", block.TxSha, txSha)
return
}
receiptSha := DeriveSha(receipts)
if bytes.Compare(receiptSha, block.ReceiptSha) != 0 {
err = fmt.Errorf("Error validating receipt sha. Received %x, got %x", block.ReceiptSha, receiptSha)
err = fmt.Errorf("Error validating receipt root. Received %x, got %x", block.ReceiptSha, receiptSha)
return
}
@@ -238,7 +238,7 @@ func (sm *BlockManager) ProcessWithParent(block, parent *Block) (td *big.Int, me
return
}
block.SetReceipts(receipts)
block.receipts = receipts
rbloom := CreateBloom(block)
if bytes.Compare(rbloom, block.LogsBloom) != 0 {
err = fmt.Errorf("unable to replicate block's bloom: %x", rbloom)
@@ -260,12 +260,7 @@ func (sm *BlockManager) ProcessWithParent(block, parent *Block) (td *big.Int, me
messages := state.Manifest().Messages
state.Manifest().Reset()
/*
sm.eth.ChainManager().SetTotalDifficulty(td)
sm.eth.ChainManager().add(block)
sm.eth.EventMux().Post(NewBlockEvent{block})
sm.eth.EventMux().Post(messages)
*/
chainlogger.Infof("Processed block #%d (%x...)\n", block.Number, block.Hash()[0:4])
sm.transState = state.Copy()

View File

@@ -10,7 +10,6 @@ import (
func CreateBloom(block *Block) []byte {
bin := new(big.Int)
bin.Or(bin, bloom9(crypto.Sha3(block.Coinbase)))
for _, receipt := range block.Receipts() {
bin.Or(bin, LogsBloom(receipt.logs))
}