aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-01-13 21:57:51 +0800
committerobscuren <geffobscura@gmail.com>2015-01-13 21:57:51 +0800
commit82beaabf6a8b5a146a38e1d6a31a78157c79a0cf (patch)
tree7fb0dca9275c17e81fb381b749d46a4ad43bc324 /core
parente3cad04decbbc83a0c956850717cb0ae0b2b3eec (diff)
downloadgo-tangerine-82beaabf6a8b5a146a38e1d6a31a78157c79a0cf.tar.gz
go-tangerine-82beaabf6a8b5a146a38e1d6a31a78157c79a0cf.tar.zst
go-tangerine-82beaabf6a8b5a146a38e1d6a31a78157c79a0cf.zip
Fixed consensus issue
Diffstat (limited to 'core')
-rw-r--r--core/block_processor.go2
-rw-r--r--core/state_transition.go3
2 files changed, 2 insertions, 3 deletions
diff --git a/core/block_processor.go b/core/block_processor.go
index 4d93fcead..6224d7c59 100644
--- a/core/block_processor.go
+++ b/core/block_processor.go
@@ -271,7 +271,7 @@ func (sm *BlockProcessor) AccumelateRewards(statedb *state.StateDB, block, paren
reward := new(big.Int).Set(BlockReward)
ancestors := set.New()
- for _, ancestor := range sm.bc.GetAncestors(block, 6) {
+ for _, ancestor := range sm.bc.GetAncestors(block, 7) {
ancestors.Add(string(ancestor.Hash()))
}
diff --git a/core/state_transition.go b/core/state_transition.go
index b22c5bf21..8b0ca2ac4 100644
--- a/core/state_transition.go
+++ b/core/state_transition.go
@@ -192,8 +192,7 @@ func (self *StateTransition) TransitionState() (ret []byte, err error) {
if err == nil {
dataGas := big.NewInt(int64(len(ret)))
dataGas.Mul(dataGas, vm.GasCreateByte)
- if err = self.UseGas(dataGas); err == nil {
- //self.state.SetCode(ref.Address(), ret)
+ if err := self.UseGas(dataGas); err == nil {
ref.SetCode(ret)
}
}