aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-08-14 23:02:21 +0800
committerobscuren <geffobscura@gmail.com>2014-08-14 23:02:21 +0800
commit0d733aa07197c8adbbaa92a12a4ad32e86676cc7 (patch)
tree3537a2b0936e4021e0aeb8018e0143aa49f6d2b8
parentfa881220aedb638f9ee35337b2ca1817c2a8482f (diff)
downloadgo-tangerine-0d733aa07197c8adbbaa92a12a4ad32e86676cc7.tar.gz
go-tangerine-0d733aa07197c8adbbaa92a12a4ad32e86676cc7.tar.zst
go-tangerine-0d733aa07197c8adbbaa92a12a4ad32e86676cc7.zip
Removed validation check from GetMessages
-rw-r--r--ethchain/state_manager.go32
1 files changed, 2 insertions, 30 deletions
diff --git a/ethchain/state_manager.go b/ethchain/state_manager.go
index a60b28b3f..d7860b2a2 100644
--- a/ethchain/state_manager.go
+++ b/ethchain/state_manager.go
@@ -406,37 +406,9 @@ func (sm *StateManager) GetMessages(block *Block) (messages []*ethstate.Message,
defer state.Reset()
- if ethutil.Config.Diff && ethutil.Config.DiffType == "all" {
- fmt.Printf("## %x %x ##\n", block.Hash(), block.Number)
- }
-
- receipts, err := sm.ApplyDiff(state, parent, block)
- if err != nil {
- return nil, err
- }
+ sm.ApplyDiff(state, parent, block)
- txSha := CreateTxSha(receipts)
- if bytes.Compare(txSha, block.TxSha) != 0 {
- return nil, fmt.Errorf("Error validating tx sha. Received %x, got %x", block.TxSha, txSha)
- }
-
- // Block validation
- if err = sm.ValidateBlock(block); err != nil {
- statelogger.Errorln("Error validating block:", err)
- return nil, err
- }
-
- // I'm not sure, but I don't know if there should be thrown
- // any errors at this time.
- if err = sm.AccumelateRewards(state, block); err != nil {
- statelogger.Errorln("Error accumulating reward", err)
- return nil, err
- }
-
- if !block.State().Cmp(state) {
- err = fmt.Errorf("Invalid merkle root.\nrec: %x\nis: %x", block.State().Trie.Root, state.Trie.Root)
- return nil, err
- }
+ sm.AccumelateRewards(state, block)
return state.Manifest().Messages, nil
}