Skip to content

Commit

Permalink
feat(bdk): changeset's Append impl checks that network is consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
evanlinjin committed Nov 15, 2023
1 parent 06a956a commit 79b84be
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/bdk/src/wallet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ impl Append for ChangeSet {
Append::append(&mut self.chain, other.chain);
Append::append(&mut self.indexed_tx_graph, other.indexed_tx_graph);
if other.network.is_some() {
debug_assert!(
self.network.is_none() || self.network == other.network,
"network type must be consistent"
);
self.network = other.network;
}
}
Expand Down

0 comments on commit 79b84be

Please sign in to comment.