Skip to content

Commit a592b91

Browse files
committed
Reduce the number of initial blocks in dont_make_announcements_while_blocks_are_being_sent; use explicit delay.
1 parent eaaf090 commit a592b91

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

p2p/src/sync/tests/block_announcement.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// See the License for the specific language governing permissions and
1414
// limitations under the License.
1515

16-
use std::sync::Arc;
16+
use std::{sync::Arc, time::Duration};
1717

1818
use chainstate::{ban_score::BanScore, BlockError, ChainstateError, CheckBlockError};
1919
use chainstate_test_framework::TestFramework;
@@ -1019,7 +1019,7 @@ async fn dont_make_announcements_while_blocks_are_being_sent(#[case] seed: Seed)
10191019
// because the LocalEvent::ChainstateNewTip for the new block (the one created
10201020
// inside the loop) may reach Peer when all initial blocks have already been sent,
10211021
// in which case it'll happily produce a block announcement.
1022-
100,
1022+
20,
10231023
&mut rng,
10241024
);
10251025
let initial_block_headers: Vec<_> =
@@ -1084,6 +1084,8 @@ async fn dont_make_announcements_while_blocks_are_being_sent(#[case] seed: Seed)
10841084
)
10851085
.await;
10861086
}
1087+
1088+
tokio::time::sleep(Duration::from_millis(100));
10871089
}
10881090
assert_eq!(intermediate_block_headers.len(), 1);
10891091

0 commit comments

Comments
 (0)