aboutsummaryrefslogtreecommitdiffstats
path: root/chain
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-11-14 20:47:12 +0800
committerobscuren <geffobscura@gmail.com>2014-11-14 20:47:12 +0800
commitf6e55962a8cadfb440dd03467017941b96838362 (patch)
tree259bdf39e8697f03c0f1944d4c33cbfb21277204 /chain
parent20d518ee959f1621a5accf1f3432282a6c0d6c3c (diff)
downloaddexon-f6e55962a8cadfb440dd03467017941b96838362.tar.gz
dexon-f6e55962a8cadfb440dd03467017941b96838362.tar.zst
dexon-f6e55962a8cadfb440dd03467017941b96838362.zip
Fixes for PV41/42
* Don't expand mem on empty value * Removed all coinbase logs for PV42 * Removed C++ bug stuff for LOG*
Diffstat (limited to 'chain')
-rw-r--r--chain/block_manager.go13
-rw-r--r--chain/bloom9.go1
2 files changed, 4 insertions, 10 deletions
diff --git a/chain/block_manager.go b/chain/block_manager.go
index 730a44e7b..d39f188d4 100644
--- a/chain/block_manager.go
+++ b/chain/block_manager.go
@@ -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()
diff --git a/chain/bloom9.go b/chain/bloom9.go
index 4c029b56b..bf270127e 100644
--- a/chain/bloom9.go
+++ b/chain/bloom9.go
@@ -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))
}