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:
obscuren
2015-04-01 10:53:32 +02:00
parent d3e86f9208
commit 0a554a1f27
8 changed files with 77 additions and 43 deletions

View File

@ -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)