Skip to content

Commit

Permalink
fix(taiko_consensus): fix withdrawals amount unit (ethereum#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaikocha committed May 20, 2023
1 parent e675d71 commit 59f0674
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions consensus/taiko/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,7 @@ func (t *Taiko) Finalize(chain consensus.ChainHeaderReader, header *types.Header
header.Difficulty = common.Big0
// Withdrawals processing.
for _, w := range withdrawals {
// Convert amount from gwei to wei.
amount := new(big.Int).SetUint64(w.Amount)
amount = amount.Mul(amount, big.NewInt(params.GWei))
state.AddBalance(w.Address, amount)
state.AddBalance(w.Address, new(big.Int).SetUint64(w.Amount))
}
header.Root = state.IntermediateRoot(true)
}
Expand Down

0 comments on commit 59f0674

Please sign in to comment.