Skip to content

Commit e342a8c

Browse files
committed
feat(bdk): changeset's Append impl checks that network is consistent
1 parent 63e06fd commit e342a8c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

crates/bdk/src/wallet/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ impl Append for ChangeSet {
136136
Append::append(&mut self.chain, other.chain);
137137
Append::append(&mut self.indexed_tx_graph, other.indexed_tx_graph);
138138
if other.network.is_some() {
139+
debug_assert!(
140+
self.network.is_none() || self.network == other.network,
141+
"network type must be consistent"
142+
);
139143
self.network = other.network;
140144
}
141145
}

0 commit comments

Comments
 (0)