Added a length for copy

This commit is contained in:
obscuren 2014-04-09 16:00:28 +02:00
parent c0cad0b534
commit 6d28bf534f

View File

@ -288,7 +288,7 @@ func (sm *StateManager) AccumelateRewards(block *Block) error {
// Reward amount of ether to the coinbase address // Reward amount of ether to the coinbase address
addr.AddFee(CalculateBlockReward(block, len(block.Uncles))) addr.AddFee(CalculateBlockReward(block, len(block.Uncles)))
var acc []byte acc := make([]byte, len(block.Coinbase))
copy(acc, block.Coinbase) copy(acc, block.Coinbase)
sm.procState.UpdateAccount(acc, addr) sm.procState.UpdateAccount(acc, addr)