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 6, 2023
1 parent 63e06fd commit e342a8c
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 @@ -136,6 +136,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 e342a8c

Please sign in to comment.