Assert that .finish() hasn't been called already in coin_selection

This commit is contained in:
LLFourn committed 2021-01-22 14:33:37 +11:00
1 parent 7bf46c7d71
commit 735db02850
1 file changed
+4
+4
View File
@@ -414,6 +414,10 @@ impl<'a, B, D: BatchDatabase, Cs: CoinSelectionAlgorithm<D>, Ctx: TxBuilderConte
self,
coin_selection: P,
) -> TxBuilder<'a, B, D, P, Ctx> {
assert!(
self.coin_selection.is_some(),
"can't set coin_selection after finish() has been called"
);
TxBuilder {
wallet: self.wallet,
params: self.params,