mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-20 13:44:31 +00:00
## Why this should be merged Simplification of `types.Body` RLP overriding, resulting in reduced code at both the implementation and consumer ends. ## How this works Introduction of `rlp.Fields` type, to mirror regular RLP encoding of a struct. The RLP override hook now only needs to return the fields of interest, which MAY come from either the `Body` or the registered extra. This pattern allows for arbitrary modification of upstream fields via (1) reordering; (2) addition; (3) deletion; and (4) inverting required vs optional status. While less important for `Body`, this allows for complete support of `ava-labs/coreth` `Header` modifications, which make use of 1-3. ## How this was tested Existing backwards-compatibility tests + new unit tests for introduced functionality. --------- Signed-off-by: Arran Schlosberg <519948+ARR4N@users.noreply.github.com> Co-authored-by: Quentin McGaw <quentin.mcgaw@avalabs.org> |
||
|---|---|---|
| .. | ||
| internal/rlpstruct | ||
| rlpgen | ||
| decode.go | ||
| decode_tail_test.go | ||
| decode_test.go | ||
| doc.go | ||
| encbuffer.go | ||
| encbuffer_example_test.go | ||
| encode.go | ||
| encode_test.go | ||
| encoder_example_test.go | ||
| fields.libevm.go | ||
| fields.libevm_test.go | ||
| iterator.go | ||
| iterator_test.go | ||
| list.libevm.go | ||
| list.libevm_test.go | ||
| raw.go | ||
| raw_test.go | ||
| safe.go | ||
| typecache.go | ||
| unsafe.go | ||