waits for tip change after each commit call to the state-service in mempool_cancel_mined (#5347)
This commit is contained in:
parent
1ec632a493
commit
7207f9d732
|
@ -417,6 +417,21 @@ async fn mempool_cancel_mined() -> Result<(), Report> {
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
|
// Wait for the chain tip update
|
||||||
|
if let Err(timeout_error) = timeout(
|
||||||
|
CHAIN_TIP_UPDATE_WAIT_LIMIT,
|
||||||
|
chain_tip_change.wait_for_tip_change(),
|
||||||
|
)
|
||||||
|
.await
|
||||||
|
.map(|change_result| change_result.expect("unexpected chain tip update failure"))
|
||||||
|
{
|
||||||
|
info!(
|
||||||
|
timeout = ?humantime_seconds(CHAIN_TIP_UPDATE_WAIT_LIMIT),
|
||||||
|
?timeout_error,
|
||||||
|
"timeout waiting for chain tip change after committing block"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// Query the mempool to make it poll chain_tip_change
|
// Query the mempool to make it poll chain_tip_change
|
||||||
mempool.dummy_call().await;
|
mempool.dummy_call().await;
|
||||||
|
|
||||||
|
@ -431,6 +446,21 @@ async fn mempool_cancel_mined() -> Result<(), Report> {
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
|
// Wait for the chain tip update
|
||||||
|
if let Err(timeout_error) = timeout(
|
||||||
|
CHAIN_TIP_UPDATE_WAIT_LIMIT,
|
||||||
|
chain_tip_change.wait_for_tip_change(),
|
||||||
|
)
|
||||||
|
.await
|
||||||
|
.map(|change_result| change_result.expect("unexpected chain tip update failure"))
|
||||||
|
{
|
||||||
|
info!(
|
||||||
|
timeout = ?humantime_seconds(CHAIN_TIP_UPDATE_WAIT_LIMIT),
|
||||||
|
?timeout_error,
|
||||||
|
"timeout waiting for chain tip change after committing block"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// Query the mempool to make it poll chain_tip_change
|
// Query the mempool to make it poll chain_tip_change
|
||||||
mempool.dummy_call().await;
|
mempool.dummy_call().await;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue