Fixed consensus issue
This commit is contained in:
parent
e3cad04dec
commit
82beaabf6a
@ -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()))
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
@ -79,7 +79,6 @@ func RunVmTest(p string, t *testing.T) {
|
||||
helper.CreateFileTests(t, p, &tests)
|
||||
|
||||
for name, test := range tests {
|
||||
//helper.Log.Infoln("Running", name)
|
||||
db, _ := ethdb.NewMemDatabase()
|
||||
statedb := state.New(nil, db)
|
||||
for addr, account := range test.Pre {
|
||||
|
@ -663,8 +663,8 @@ func (self *DebugVm) Run(me, caller ContextRef, code []byte, value, gas, price *
|
||||
|
||||
context.UseGas(context.Gas)
|
||||
|
||||
ret, err, ref := self.env.Create(context, addr, input, gas, price, value)
|
||||
if err != nil {
|
||||
ret, suberr, ref := self.env.Create(context, addr, input, gas, price, value)
|
||||
if suberr != nil {
|
||||
stack.Push(ethutil.BigFalse)
|
||||
|
||||
self.Printf("CREATE err %v", err)
|
||||
|
Loading…
Reference in New Issue
Block a user