fix(traverse): Handle Shelley's lack of invalid_transactions field (#138)
This commit is contained in:
parent
2a70c6a090
commit
4797f31d23
2 changed files with 6 additions and 5 deletions
|
|
@ -166,9 +166,9 @@ mod tests {
|
|||
fn test_iteration() {
|
||||
let blocks = vec![
|
||||
(include_str!("../../test_data/byron2.block"), 2usize),
|
||||
(include_str!("../../test_data/shelley1.block"), 0),
|
||||
(include_str!("../../test_data/mary1.block"), 0),
|
||||
(include_str!("../../test_data/allegra1.block"), 0),
|
||||
(include_str!("../../test_data/shelley1.block"), 4),
|
||||
(include_str!("../../test_data/mary1.block"), 14),
|
||||
(include_str!("../../test_data/allegra1.block"), 3),
|
||||
(include_str!("../../test_data/alonzo1.block"), 5),
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -11,8 +11,9 @@ macro_rules! clone_tx_fn {
|
|||
|
||||
let success = !block
|
||||
.invalid_transactions
|
||||
.as_ref()?
|
||||
.contains(&(index as u32));
|
||||
.as_ref()
|
||||
.map(|x| x.contains(&(index as u32)))
|
||||
.unwrap_or(false);
|
||||
|
||||
let auxiliary_data = block
|
||||
.auxiliary_data_set
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue