See bad ergonomics here:
|
let c = chain |
|
.blocks() |
|
.iter() |
|
.rev() |
|
.take(ASSUME_FINAL_DEPTH) |
|
.map(|(k, v)| (*k, *v)) |
|
.collect::<BTreeMap<u32, BlockHash>>(); |
|
|
We should just be able to cheaply clone the whole thing (without copying all the data using referencing counting and linked list). From this you should be able to get an owned iterator of BlockId.
See bad ergonomics here:
bdk/example-crates/example_electrum/src/main.rs
Lines 145 to 152 in 965cbe6
We should just be able to cheaply clone the whole thing (without copying all the data using referencing counting and linked list). From this you should be able to get an owned iterator of
BlockId.