forked from cerc-io/plugeth
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)
|
reward := new(big.Int).Set(BlockReward)
|
||||||
|
|
||||||
ancestors := set.New()
|
ancestors := set.New()
|
||||||
for _, ancestor := range sm.bc.GetAncestors(block, 6) {
|
for _, ancestor := range sm.bc.GetAncestors(block, 7) {
|
||||||
ancestors.Add(string(ancestor.Hash()))
|
ancestors.Add(string(ancestor.Hash()))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -192,8 +192,7 @@ func (self *StateTransition) TransitionState() (ret []byte, err error) {
|
|||||||
if err == nil {
|
if err == nil {
|
||||||
dataGas := big.NewInt(int64(len(ret)))
|
dataGas := big.NewInt(int64(len(ret)))
|
||||||
dataGas.Mul(dataGas, vm.GasCreateByte)
|
dataGas.Mul(dataGas, vm.GasCreateByte)
|
||||||
if err = self.UseGas(dataGas); err == nil {
|
if err := self.UseGas(dataGas); err == nil {
|
||||||
//self.state.SetCode(ref.Address(), ret)
|
|
||||||
ref.SetCode(ret)
|
ref.SetCode(ret)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -79,7 +79,6 @@ func RunVmTest(p string, t *testing.T) {
|
|||||||
helper.CreateFileTests(t, p, &tests)
|
helper.CreateFileTests(t, p, &tests)
|
||||||
|
|
||||||
for name, test := range tests {
|
for name, test := range tests {
|
||||||
//helper.Log.Infoln("Running", name)
|
|
||||||
db, _ := ethdb.NewMemDatabase()
|
db, _ := ethdb.NewMemDatabase()
|
||||||
statedb := state.New(nil, db)
|
statedb := state.New(nil, db)
|
||||||
for addr, account := range test.Pre {
|
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)
|
context.UseGas(context.Gas)
|
||||||
|
|
||||||
ret, err, ref := self.env.Create(context, addr, input, gas, price, value)
|
ret, suberr, ref := self.env.Create(context, addr, input, gas, price, value)
|
||||||
if err != nil {
|
if suberr != nil {
|
||||||
stack.Push(ethutil.BigFalse)
|
stack.Push(ethutil.BigFalse)
|
||||||
|
|
||||||
self.Printf("CREATE err %v", err)
|
self.Printf("CREATE err %v", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user