aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/state_manager.go
diff options
context:
space:
mode:
authorzelig <viktor.tron@gmail.com>2014-07-01 22:03:02 +0800
committerzelig <viktor.tron@gmail.com>2014-07-01 22:03:02 +0800
commit89630d2826300d119f2cdc9f8af6c94926f478a2 (patch)
treeaa2addd061e2d2a8f3cdc0821260409f31ac3b09 /ethchain/state_manager.go
parent12972b4b65a303dc3f9e135b0e2d97f8b7a661e2 (diff)
parent550407b0ec78b7026737d1abe28127da8c0c9063 (diff)
downloadgo-tangerine-89630d2826300d119f2cdc9f8af6c94926f478a2.tar
go-tangerine-89630d2826300d119f2cdc9f8af6c94926f478a2.tar.gz
go-tangerine-89630d2826300d119f2cdc9f8af6c94926f478a2.tar.bz2
go-tangerine-89630d2826300d119f2cdc9f8af6c94926f478a2.tar.lz
go-tangerine-89630d2826300d119f2cdc9f8af6c94926f478a2.tar.xz
go-tangerine-89630d2826300d119f2cdc9f8af6c94926f478a2.tar.zst
go-tangerine-89630d2826300d119f2cdc9f8af6c94926f478a2.zip
merge upstream
Diffstat (limited to 'ethchain/state_manager.go')
-rw-r--r--ethchain/state_manager.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/ethchain/state_manager.go b/ethchain/state_manager.go
index f199e20ec..dea82cae3 100644
--- a/ethchain/state_manager.go
+++ b/ethchain/state_manager.go
@@ -3,6 +3,7 @@ package ethchain
import (
"bytes"
"container/list"
+ "fmt"
"github.com/ethereum/eth-go/ethcrypto"
"github.com/ethereum/eth-go/ethlog"
"github.com/ethereum/eth-go/ethutil"
@@ -125,6 +126,8 @@ done:
break done
default:
statelogger.Infoln(err)
+ err = nil
+ //return nil, nil, nil, err
}
}
@@ -202,7 +205,7 @@ func (sm *StateManager) Process(block *Block, dontReact bool) (err error) {
}
if !block.State().Cmp(state) {
- statelogger.Errorf("Invalid merkle root.\nrec: %x\nis: %x", block.State().trie.Root, state.trie.Root)
+ err = fmt.Errorf("Invalid merkle root.\nrec: %x\nis: %x", block.State().trie.Root, state.trie.Root)
return
}
@@ -237,7 +240,10 @@ func (sm *StateManager) ApplyDiff(state *State, parent, block *Block) (receipts
coinbase.SetGasPool(block.CalcGasLimit(parent))
// Process the transactions on to current block
- receipts, _, _, _ = sm.ProcessTransactions(coinbase, state, block, parent, block.Transactions())
+ receipts, _, _, err = sm.ProcessTransactions(coinbase, state, block, parent, block.Transactions())
+ if err != nil {
+ return nil, err
+ }
return receipts, nil
}