Blocktest fixed, Execution fixed
* Added new CreateAccount method which properly overwrites previous accounts (excluding balance) * Fixed block tests (100% success)
This commit is contained in:
@ -326,8 +326,12 @@ func (sm *BlockProcessor) AccumulateRewards(statedb *state.StateDB, block, paren
|
||||
return ValidationError(fmt.Sprintf("%v", err))
|
||||
}
|
||||
|
||||
num := new(big.Int).Add(big.NewInt(8), uncle.Number)
|
||||
num.Sub(num, block.Number())
|
||||
|
||||
r := new(big.Int)
|
||||
r.Mul(BlockReward, big.NewInt(15)).Div(r, big.NewInt(16))
|
||||
r.Mul(BlockReward, num)
|
||||
r.Div(r, big.NewInt(8))
|
||||
|
||||
statedb.AddBalance(uncle.Coinbase, r)
|
||||
|
||||
|
Reference in New Issue
Block a user