test tests::test_add_content_value ... FAILED
failures:
---- tests::test_add_content_value stdout ----
thread 'tests::test_add_content_value' panicked at src/lib.rs:1519:14:
called `Result::unwrap()` on an `Err` value: InvalidRlpData(UnexpectedList)
also update Enr::get to restore the previous behaviour of rlp::data which returns the payload data
closes #71
https://github.com/sigp/enr/issues/71#issuecomment-2033297989
This changes the sanitize check from
Bytes::decode
toHeader::decode
, this is required for list types that are added viaBuilder::add_value
becauseBytes::decode
fails on lists: https://github.com/alloy-rs/rlp/blob/2ccf23f7b6a363c844443a13f9496391ee6892ac/crates/rlp/src/decode.rs#L83added new test that fails on main:
also update
Enr::get
to restore the previous behaviour of rlp::data which returns the payload datahttps://docs.rs/rlp/latest/src/rlp/rlpin.rs.html#159
we could add a
Bytes::decode_unchecked
to alloy-rlp that does not care about listcc @DaniPopes