@@ -32,7 +32,8 @@ def test_simple_unvault_broadcast(miradord, bitcoind):
3232 [
3333 f"Got a confirmed Unvault UTXO at '{ unvault_txid } :0'" ,
3434 f"Broadcasted Cancel transaction '{ txs ['cancel' ]['tx' ]} '" ,
35- f"Unvault transaction '{ unvault_txid } ' for vault at '{ deposit_outpoint } ' is still unspent" ,
35+ f"Unvault transaction '{ unvault_txid } ' for vault at '{ deposit_outpoint } ' is"
36+ " still unspent" ,
3637 ]
3738 )
3839
@@ -70,7 +71,8 @@ def test_spent_cancel_detection(miradord, bitcoind):
7071 [
7172 f"Got a confirmed Unvault UTXO at '{ unvault_txid } :0'" ,
7273 f"Broadcasted Cancel transaction '{ txs ['cancel' ]['tx' ]} '" ,
73- f"Unvault transaction '{ unvault_txid } ' for vault at '{ deposit_outpoint } ' is still unspent" ,
74+ f"Unvault transaction '{ unvault_txid } ' for vault at '{ deposit_outpoint } ' is"
75+ " still unspent" ,
7476 ]
7577 )
7678
@@ -82,7 +84,8 @@ def test_spent_cancel_detection(miradord, bitcoind):
8284
8385 bitcoind .generate_block (1 , wait_for_mempool = [cancel_tx ["txid" ], unvault_txid ])
8486 miradord .wait_for_log (
85- f"Noticed at height .* that Cancel transaction was confirmed for vault at '{ deposit_outpoint } '"
87+ "Noticed at height .* that Cancel transaction was confirmed for vault at"
88+ f" '{ deposit_outpoint } '"
8689 )
8790
8891
@@ -119,9 +122,24 @@ def test_simple_spend_detection(miradord, bitcoind):
119122 bitcoind .rpc .sendrawtransaction (txs ["spend" ]["tx" ])
120123 bitcoind .generate_block (1 , 1 )
121124 miradord .wait_for_log (
122- f"Noticed .* that Spend transaction was confirmed for vault at '{ deposit_outpoint } '"
125+ "Noticed .* that Spend transaction was confirmed for vault at"
126+ f" '{ deposit_outpoint } '"
123127 )
124128
125129 # Generate two days worth of blocks, the WT should forget about this vault
126130 bitcoind .generate_block (288 )
127131 miradord .wait_for_log (f"Forgetting about consumed vault at '{ deposit_outpoint } '" )
132+
133+
134+ def test_feerate_estimation (miradord , bitcoind ):
135+ # Generate some transaction history for estimatesmartfee.
136+ # 10 transactions in 50 blocks (send to deposit address)
137+ amount = 1
138+ for block in range (0 , 50 ):
139+ wait_for_mempool = []
140+ for tx in range (0 , 10 ):
141+ txid , outpoint = bitcoind .create_utxo (DEPOSIT_ADDRESS , amount )
142+ wait_for_mempool .append (txid )
143+ bitcoind .generate_block (1 , wait_for_mempool )
144+ feerate = bitcoind .estimatesmartfee (1 )["feerate" ].normalize ()
145+ miradord .wait_for_logs ([f"feerate estimate is { feerate } " ])
0 commit comments