Skip to content

Commit

Permalink
fix: revert changed const in peertest utils and fix light client upda…
Browse files Browse the repository at this point in the history
…te validation test (ethereum#1520)
  • Loading branch information
ogenev authored Oct 10, 2024
1 parent 7bf62e0 commit 5287f9d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ethportal-peertest/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ where
Fut: Future<Output = Result<O>>,
{
// If content is absent an error will be returned.
for counter in 0..10 {
for counter in 0..60 {
let result = f().await;
match result {
Ok(val) => return val,
Expand Down
7 changes: 4 additions & 3 deletions trin-beacon/src/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -441,10 +441,11 @@ mod tests {

assert!(result.valid_for_storing);

// Expect error because the finalized slot does not match the content key finalized slot
// Expect error because the content key finalized slot is greaten than the light client
// update finalized slot
let invalid_content_key =
BeaconContentKey::LightClientFinalityUpdate(LightClientFinalityUpdateKey {
finalized_slot: 0,
finalized_slot: 17748599031001599584 + 1,
});
let result = validator
.validate_content(&invalid_content_key, &content)
Expand All @@ -453,7 +454,7 @@ mod tests {

assert_eq!(
result.to_string(),
"Light client finality update finalized slot does not match the content key finalized slot: 17748599031001599584 != 0"
"Light client finality update finalized slot should be equal or greater than content key finalized slot: 17748599031001599584 < 17748599031001599585"
);

// Expect error because the light client finality update is not from the recent fork
Expand Down

0 comments on commit 5287f9d

Please sign in to comment.