Skip to content

Commit 3477d35

Browse files
author
Abdul Rabbani
committed
Handle all breaking changes for the patch
The major change to integrate the patch has been: * Updating the arguments for `rlp.EncodeToBytes`. This function accepts interfaces, but since the last update, it is better to pass in a pointer to the function. * From the Ethereum Release Notes: " Compatibility note about `core/types`: For optimization purposes, `types.Header` and other types in this package now implement the `rlp.Encoder` interface. This change can cause incompatibilities because the new method is implemented with pointer receiver. Attempting to RLP-encode unadressable (i.e. non-pointer) values of type `Header` does not work anymore and will result in an error." * Instead of just updating all the headers. I have updated all parameters for the `rlp.EncodeToBytes` to be pointers instead of values. __Please take a close look at the updates__. The functions won't fail if a non-pointer is passed (in most cases), but we could be unexpected behaviors.
1 parent e5824ec commit 3477d35

File tree

15 files changed

+154
-152
lines changed

15 files changed

+154
-152
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,5 @@ related-repositories/ipld-eth-db/**
5757
statediff/indexer/database/sql/statediffing_test_file.sql
5858
statediff/statediffing_test_file.sql
5959
statediff/known_gaps.sql
60+
related-repositories/foundry-test/
61+
related-repositories/ipld-eth-db/

statediff/builder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import (
3636

3737
var (
3838
nullHashBytes = common.Hex2Bytes("0000000000000000000000000000000000000000000000000000000000000000")
39-
emptyNode, _ = rlp.EncodeToBytes([]byte{})
39+
emptyNode, _ = rlp.EncodeToBytes(&[]byte{})
4040
emptyContractRoot = crypto.Keccak256Hash(emptyNode)
4141
nullCodeHash = crypto.Keccak256Hash([]byte{}).Bytes()
4242
)

0 commit comments

Comments
 (0)