Commit 0308fe4e authored by Matthew Slipper's avatar Matthew Slipper Committed by GitHub

op-node: fix withdrawals (#3326)

Fixes withdrawals by specifying the correct storage slot. Note that this does not fix the op-e2e tests, which were incorrectly passing. @protolambda is working on this.
parent ff7f2d3c
...@@ -319,6 +319,5 @@ func StorageSlotOfWithdrawalHash(hash common.Hash) common.Hash { ...@@ -319,6 +319,5 @@ func StorageSlotOfWithdrawalHash(hash common.Hash) common.Hash {
// Where p is the 32 byte value of the storage slot and ++ is concatenation // Where p is the 32 byte value of the storage slot and ++ is concatenation
buf := make([]byte, 64) buf := make([]byte, 64)
copy(buf, hash[:]) copy(buf, hash[:])
buf[63] = 1
return crypto.Keccak256Hash(buf) return crypto.Keccak256Hash(buf)
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment