Skip to content

Commit

Permalink
fix(types): fix empty withdrawalsRoot hash value (ethereum#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaikocha authored May 19, 2023
1 parent 5493680 commit f07ec5a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/types/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ func HeaderParentHashFromRLP(header []byte) common.Hash {
func CalcWithdrawalsRootTaiko(withdrawals []*Withdrawal) common.Hash {
// only process withdrawals/deposits of 8 minimum
if len(withdrawals) == 0 {
return EmptyWithdrawalsHash
return EmptyCodeHash // a known keccak256 hash of the empty payload bytes.
}

var b []byte
Expand Down
2 changes: 1 addition & 1 deletion core/types/block_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ func Test_CalcWithdrawalsRootTaiko(t *testing.T) {
{
"empty",
nil,
EmptyWithdrawalsHash,
EmptyCodeHash,
},
{
"withWithdrawals",
Expand Down

0 comments on commit f07ec5a

Please sign in to comment.