@@ -26,7 +26,8 @@ def test_simple_unvault_broadcast(miradord, bitcoind):
2626 [
2727 f"Got a confirmed Unvault UTXO at '{ unvault_txid } :0'" ,
2828 f"Broadcasted Cancel transaction '{ txs ['cancel' ]['tx' ]} '" ,
29- f"Cancel transaction '{ cancel_txid } ' for vault at '{ deposit_outpoint } ' is still unconfirmed" ,
29+ f"Cancel transaction '{ cancel_txid } ' for vault at '{ deposit_outpoint } ' is"
30+ " still unconfirmed" ,
3031 ]
3132 )
3233
@@ -60,7 +61,8 @@ def test_spent_cancel_detection(miradord, bitcoind):
6061 [
6162 f"Got a confirmed Unvault UTXO at '{ unvault_txid } :0'" ,
6263 f"Broadcasted Cancel transaction '{ txs ['cancel' ]['tx' ]} '" ,
63- f"Cancel transaction '{ cancel_tx ['txid' ]} ' for vault at '{ deposit_outpoint } ' is still unconfirmed" ,
64+ f"Cancel transaction '{ cancel_tx ['txid' ]} ' for vault at"
65+ f" '{ deposit_outpoint } ' is still unconfirmed" ,
6466 ]
6567 )
6668
@@ -72,7 +74,8 @@ def test_spent_cancel_detection(miradord, bitcoind):
7274
7375 bitcoind .generate_block (1 , wait_for_mempool = [cancel_tx ["txid" ], unvault_txid ])
7476 miradord .wait_for_log (
75- f"Noticed at height .* that Cancel transaction '{ cancel_tx ['txid' ]} ' was confirmed for vault at '{ deposit_outpoint } '"
77+ f"Noticed at height .* that Cancel transaction '{ cancel_tx ['txid' ]} ' was"
78+ f" confirmed for vault at '{ deposit_outpoint } '"
7679 )
7780
7881
@@ -95,7 +98,8 @@ def test_undetected_cancel(miradord, bitcoind):
9598 [
9699 f"Got a confirmed Unvault UTXO at '{ unvault_txid } :0'" ,
97100 f"Broadcasted Cancel transaction '{ txs ['cancel' ]['tx' ]} '" ,
98- f"Cancel transaction '{ cancel_tx ['txid' ]} ' for vault at '{ deposit_outpoint } ' is still unconfirmed" ,
101+ f"Cancel transaction '{ cancel_tx ['txid' ]} ' for vault at"
102+ f" '{ deposit_outpoint } ' is still unconfirmed" ,
99103 ]
100104 )
101105 bitcoind .generate_blocks_censor (CSV , [cancel_tx ["txid" ]])
@@ -114,3 +118,17 @@ def test_undetected_cancel(miradord, bitcoind):
114118 f"spent for vault at '{ deposit_outpoint } ', but our Cancel transaction output"
115119 " is not part of the UTxO set."
116120 )
121+
122+
123+ def test_feerate_estimation (miradord , bitcoind ):
124+ # Generate some transaction history for estimatesmartfee.
125+ # 10 transactions in 50 blocks (send to deposit address)
126+ amount = 1
127+ for block in range (0 , 50 ):
128+ wait_for_mempool = []
129+ for tx in range (0 , 10 ):
130+ txid , outpoint = bitcoind .create_utxo (DEPOSIT_ADDRESS , amount )
131+ wait_for_mempool .append (txid )
132+ bitcoind .generate_block (1 , wait_for_mempool )
133+ feerate = bitcoind .estimatesmartfee (1 )['feerate' ].normalize ()
134+ miradord .wait_for_logs ([f"feerate estimate is { feerate } " ])
0 commit comments