Skip to content

Commit

Permalink
Merge pull request #3372 from Zeegomo/fix-leadership-tests
Browse files Browse the repository at this point in the history
reverse order of leadership logs
  • Loading branch information
zeegomo committed Jun 16, 2021
2 parents 26f6fc1 + 70fe8ea commit 03c52c0
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,13 @@ pub fn test_leadership_logs_parent_hash_is_correct() {
.wait_for_bootstrap(&StartupVerificationMode::Rest, Duration::from_secs(10))
.unwrap();

// Give the node some time to produce blocks
std::thread::sleep(Duration::from_secs(5));

let leadership_logs = jcli.rest().v0().leadership_log(jormungandr.rest_uri());

for leadership in leadership_logs.iter().take(10) {
// leadership logs are fetched in reverse order (newest first)
for leadership in leadership_logs.iter().take(10).rev() {
if let LeadershipLogStatus::Block {
block,
parent,
Expand Down

0 comments on commit 03c52c0

Please sign in to comment.