test: fix populate_test_db conf calculation

populate_test_db would previously give back a transaction with N + 1
confirmations when you asked for N.

This commit also fixes test_spend_coinbase, which would improperly
ask for a transaction with 0 confirmations instead of 1.
This commit is contained in:
Daniela Brozzoni committed 2022-07-06 12:48:18 +02:00
1 parent 1d9fdd01fa
commit 98748906f6
2 files changed
+8 -5

No files matched your search

+1 -1
View File
@@ -4723,7 +4723,7 @@ pub(crate) mod test {
crate::populate_test_db!(
wallet.database.borrow_mut(),
testutils! (@tx ( (@external descriptors, 0) => 25_000 ) (@confirmations 0)),
testutils! (@tx ( (@external descriptors, 0) => 25_000 ) (@confirmations 1)),
Some(confirmation_time),
(@coinbase true)
);