From ea0357bf02b61db94bd0ad8806ba7337a55a4f79 Mon Sep 17 00:00:00 2001 From: obscuren Date: Sun, 28 Sep 2014 14:52:58 +0200 Subject: Block pool is thread safe --- ethchain/state_manager.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'ethchain') diff --git a/ethchain/state_manager.go b/ethchain/state_manager.go index 6bcbe063e..cd2d57af9 100644 --- a/ethchain/state_manager.go +++ b/ethchain/state_manager.go @@ -143,9 +143,6 @@ done: } } - // Notify all subscribers - self.Ethereum.Reactor().Post("newTx:post", tx) - // Update the state with pending changes state.Update() @@ -160,10 +157,15 @@ done: os.Exit(1) } - return nil, nil, nil, fmt.Errorf("err diff #%d (r) %v ~ %x <=> (c) %v ~ %x (%x)\n", i+1, original.CumulativeGasUsed, original.PostState[0:4], receipt.CumulativeGasUsed, receipt.PostState[0:4], receipt.Tx.Hash()) + err := fmt.Errorf("#%d receipt failed (r) %v ~ %x <=> (c) %v ~ %x (%x...)", i+1, original.CumulativeGasUsed, original.PostState[0:4], receipt.CumulativeGasUsed, receipt.PostState[0:4], receipt.Tx.Hash()[0:4]) + + return nil, nil, nil, err } } + // Notify all subscribers + self.Ethereum.Reactor().Post("newTx:post", tx) + receipts = append(receipts, receipt) handled = append(handled, tx) -- cgit v1.2.3