Skip to content

Commit

Permalink
feat(eth): update DeliverBodies to use CalcWithdrawalsRootTaiko (e…
Browse files Browse the repository at this point in the history
…thereum#87)

* feat(eth): update `DeliverBodies` to use `CalcWithdrawalsRootTaiko`

* chore: update workflow
  • Loading branch information
davidtaikocha authored Jun 3, 2023
1 parent f07672a commit 8b16b30
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions eth/downloader/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -794,9 +794,16 @@ func (q *queue) DeliverBodies(id string, txLists [][]*types.Transaction, txListH
return errInvalidBody
}
// CHANGE(taiko): change the empty withdrawalsRoot hash to EmptyCodeHash
if withdrawalListHashes[index] == types.EmptyRootHash && os.Getenv("TAIKO_TEST") == "" {
withdrawalListHashes[index] = types.EmptyCodeHash
if withdrawalListHashes[index] == types.EmptyRootHash {
if os.Getenv("TAIKO_TEST") == "" {
withdrawalListHashes[index] = common.HexToHash("0x569e75fc77c1a856f6daaf9e69d8a9566ca34aa47f9133711ce065a571af0cfd")
}
} else {
if os.Getenv("TAIKO_TEST") == "" {
withdrawalListHashes[index] = types.CalcWithdrawalsRootTaiko(withdrawalLists[index])
}
}

if withdrawalListHashes[index] != *header.WithdrawalsHash {
return errInvalidBody
}
Expand Down

0 comments on commit 8b16b30

Please sign in to comment.