consensus/ethash: move accumulation of coinbase witness before coinbase account is credited (#41)

verkle/onleaf
jwasinger 3 years ago committed by GitHub
parent fa753db9e8
commit 5bac5b3262
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      consensus/ethash/consensus.go

@ -669,7 +669,7 @@ func accumulateRewards(config *params.ChainConfig, state *state.StateDB, header
r.Div(blockReward, big32)
reward.Add(reward, r)
}
state.AddBalance(header.Coinbase, reward)
coinbase := utils.GetTreeKeyBalance(header.Coinbase.Bytes())
state.Witness().TouchAddress(coinbase, state.GetBalance(header.Coinbase).Bytes())
state.AddBalance(header.Coinbase, reward)
}

Loading…
Cancel
Save