The comment in readExecutionTransaction is not actually relevant when the rlp.decode template is called from a non-generic function. The function still cannot be simply inlined; is_valid_versioned_hashes is itself generic and would require an export eth_types_rlp to work properly (generic sandwich issue). The non-generic function wrapper seems simpler and avoids injecting RLP into importing modules.
The comment in
readExecutionTransaction
is not actually relevant when therlp.decode
template is called from a non-generic function. The function still cannot be simply inlined;is_valid_versioned_hashes
is itself generic and would require anexport eth_types_rlp
to work properly (generic sandwich issue). The non-generic function wrapper seems simpler and avoids injecting RLP into importing modules.