Skip to content

Commit

Permalink
add explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
wanwiset25 committed Jun 28, 2024
1 parent 4be4f2e commit 82f2f63
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions eth/protocol.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ const (
xdpos22 = 101 //xdpos2.2 = eth65
)

// XDC needs the below functions because direct number equality doesn't work (eg. version >= 63)
// we should try to match protocols 1 to 1 from now on, bump xdpos along with any new eth (eg. eth66 = xdpos23 only)
// try to follow the exact comparison from go-ethereum as much as possible (eg. version >= 63 <> isEth63OrHigher(version))

func isEth63(version int) bool {
switch {
case version == 63:
Expand All @@ -48,7 +52,6 @@ func isEth63(version int) bool {
return false
}
}

func isEth64(version int) bool {
switch {
case version == 64:
Expand All @@ -57,7 +60,6 @@ func isEth64(version int) bool {
return false
}
}

func isEth65(version int) bool {
switch {
case version == 65:
Expand Down

0 comments on commit 82f2f63

Please sign in to comment.