mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-21 16:14:23 +01:00
pytest: wait until mock is called for set_feerates.
Got a spurious failure in test_no_fee_estimate; we fired too soon from the logs (presumably we raced in on the first response, but estimatesmartfee gets called 3 times). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
d5c3626fa7
commit
e41e1a177e
@@ -627,8 +627,10 @@ class LightningNode(object):
|
||||
}
|
||||
self.daemon.rpcproxy.mock_rpc('estimatesmartfee', mock_estimatesmartfee)
|
||||
|
||||
# Technically, this waits until it's called, not until it's processed.
|
||||
# We wait until all three levels have been called.
|
||||
if wait_for_effect:
|
||||
self.daemon.wait_for_log('Feerate estimate for .* set to')
|
||||
wait_for(lambda: self.daemon.rpcproxy.mock_counts['estimatesmartfee'] >= 3)
|
||||
|
||||
|
||||
class NodeFactory(object):
|
||||
|
||||
Reference in New Issue
Block a user