Skip to content

Commit b530dc3

Browse files
authored
Add header saturation delay for history bridge test mode (#900)
1 parent 28e6072 commit b530dc3

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

portal-bridge/src/bridge.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,16 @@ impl Bridge {
8686
.expect("Error parsing history test assets.");
8787

8888
for asset in assets.0.into_iter() {
89-
Bridge::gossip_content(&self.portal_clients, asset.content_key, asset.content_value)
90-
.await
91-
.expect("Error serving block range in test mode.");
89+
Bridge::gossip_content(
90+
&self.portal_clients,
91+
asset.content_key.clone(),
92+
asset.content_value,
93+
)
94+
.await
95+
.expect("Error serving block range in test mode.");
96+
if let HistoryContentKey::BlockHeaderWithProof(_) = asset.content_key {
97+
sleep(Duration::from_millis(50)).await;
98+
}
9299
}
93100
}
94101

0 commit comments

Comments
 (0)