Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix parsing sequences of H256s in a matchinglist via agent settings (#…
…3180) ### Description Upon trying to use a blacklist with an array of H256s as the `recipientAddress`, was getting a panic: ``` running 1 test parse_value: Array [Object {"destinationdomain": Number(11155111), "origindomain": Number(1399811151), "recipientaddress": Array [String("0x6AD4DEBA8A147d000C09de6465267a9047d1c217"), String("0x6AD4DEBA8A147d000C09de6465267a9047d1c218")], "senderaddress": Array [String("0x6AD4DEBA8A147d000C09de6465267a9047d1c217"), String("0x6AD4DEBA8A147d000C09de6465267a9047d1c218")]}] "Expected matching list" thread 'settings::matching_list::test::supports_sequence_h256s' panicked at 'called `Result::unwrap()` on an `Err` value: ConfigParsingError([(ConfigPath([]), Expected matching list Caused by: invalid type: string "0x6AD4DEBA8A147d000C09de6465267a9047d1c217", expected a borrowed string Location: /Users/trevor/abacus-monorepo/rust/hyperlane-base/src/settings/parser/json_value_parser.rs:259:14)])', agents/relayer/src/settings/matching_list.rs:473:60 stack backtrace: 0: rust_begin_unwind at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/std/src/panicking.rs:593:5 1: core::panicking::panic_fmt at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/panicking.rs:67:14 2: core::result::unwrap_failed at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/result.rs:1651:5 3: core::result::Result<T,E>::unwrap at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/result.rs:1076:23 4: relayer::settings::matching_list::test::supports_sequence_h256s at ./src/settings/matching_list.rs:473:9 5: relayer::settings::matching_list::test::supports_sequence_h256s::{{closure}} at ./src/settings/matching_list.rs:459:34 6: core::ops::function::FnOnce::call_once at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/ops/function.rs:250:5 7: core::ops::function::FnOnce::call_once at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/ops/function.rs:250:5 note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. test settings::matching_list::test::supports_sequence_h256s ... FAILED ``` Honestly not too sure about the implications of this being a String vs &str ### Drive-by changes <!-- Are there any minor or drive-by changes also included? --> ### Related issues <!-- - Fixes #[issue number here] --> ### Backward compatibility <!-- Are these changes backward compatible? Are there any infrastructure implications, e.g. changes that would prohibit deploying older commits using this infra tooling? Yes/No --> ### Testing <!-- What kind of testing have these changes undergone? None/Manual/Unit Tests -->
- Loading branch information