trigger electrs when polling

This commit is contained in:
Riccardo Casatta
2021-06-17 16:03:33 +02:00
parent 18dcda844f
commit 696647b893
5 changed files with 5 additions and 228 deletions

View File

@@ -41,6 +41,7 @@ impl TestClient {
fn wait_for_tx(&mut self, txid: Txid, monitor_script: &Script) {
// wait for electrs to index the tx
exponential_backoff_poll(|| {
self.electrsd.trigger().unwrap();
trace!("wait_for_tx {}", txid);
self.electrsd
@@ -57,6 +58,7 @@ impl TestClient {
loop {
let header = exponential_backoff_poll(|| {
self.electrsd.trigger().unwrap();
self.electrsd.client.ping().unwrap();
self.electrsd.client.block_headers_pop().unwrap()
});