Commit 3c20e01
Fix: Use negotiated protocol version in Status message
Previously, EthNodeStatus64ExchangeState hardcoded protocolVersion to 64
in the Status message, even when higher versions (ETH65-ETH68) were
negotiated. This caused peers to reject our Status messages and disconnect
with reason 0x10 (Other).
Changes:
- Added negotiatedCapability parameter to EthNodeStatus64ExchangeState
- Modified createStatusMsg() to use negotiatedCapability.version instead
of hardcoded Capability.ETH64.version
- Updated EtcHelloExchangeState to pass negotiated capability and log
the actual negotiated version instead of generic "eth/64+"
- All existing tests pass
Co-authored-by: realcodywburns <13103499+realcodywburns@users.noreply.github.com>1 parent 82bf231 commit 3c20e01
File tree
2 files changed
+6
-5
lines changed- src/main/scala/com/chipprbots/ethereum/network/handshaker
2 files changed
+6
-5
lines changedLines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
41 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
46 | | - | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
0 commit comments