Skip to content

Commit

Permalink
cmd/devp2p/internal/ethtest: remove TD from status validation (#31137)
Browse files Browse the repository at this point in the history
After recent changes in Geth (removing TD):

39638c8#diff-d70a44d4b7a0e84fe9dcca25d368f626ae6c9bc0b8fe9690074ba92d298bcc0d

Non-Geth clients are failing many devp2p tests with an error:
`peering failed: status exchange failed: wrong TD in status: have 1 want 0`

Right now only Geth is passing it - all other clients are affected by
this change. I think there should be no validation of TD when checking `Status`
message in hive tests. Now Geth has 0 (and hive tests requires 0) and
all other clients have actual TD. And on real networks there is no validation
of TD when peering
  • Loading branch information
marcindsobczak authored Feb 7, 2025
1 parent d74c47f commit d11e9c0
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions cmd/devp2p/internal/ethtest/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,6 @@ loop:
return fmt.Errorf("wrong head block in status, want: %#x (block %d) have %#x",
want, chain.blocks[chain.Len()-1].NumberU64(), have)
}
if have, want := msg.TD.Cmp(chain.TD()), 0; have != want {
return fmt.Errorf("wrong TD in status: have %v want %v", have, want)
}
if have, want := msg.ForkID, chain.ForkID(); !reflect.DeepEqual(have, want) {
return fmt.Errorf("wrong fork ID in status: have %v, want %v", have, want)
}
Expand Down

0 comments on commit d11e9c0

Please sign in to comment.