diff options
author | obscuren <geffobscura@gmail.com> | 2014-09-28 20:52:58 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-09-28 20:52:58 +0800 |
commit | ea0357bf02b61db94bd0ad8806ba7337a55a4f79 (patch) | |
tree | 2d6604484b81687fb0a485040e0ba1346354fd71 /ethchain/state_manager.go | |
parent | 44d50bc8d2e8bf4a87d01d6ded24d79eb50ee666 (diff) | |
download | dexon-ea0357bf02b61db94bd0ad8806ba7337a55a4f79.tar.gz dexon-ea0357bf02b61db94bd0ad8806ba7337a55a4f79.tar.zst dexon-ea0357bf02b61db94bd0ad8806ba7337a55a4f79.zip |
Block pool is thread safe
Diffstat (limited to 'ethchain/state_manager.go')
-rw-r--r-- | ethchain/state_manager.go | 10 |
1 files changed, 6 insertions, 4 deletions
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) |