mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 19:00:46 +00:00
add explanation
This commit is contained in:
parent
4be4f2eeb1
commit
82f2f63df4
1 changed files with 4 additions and 2 deletions
|
|
@ -38,6 +38,10 @@ const (
|
||||||
xdpos22 = 101 //xdpos2.2 = eth65
|
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 {
|
func isEth63(version int) bool {
|
||||||
switch {
|
switch {
|
||||||
case version == 63:
|
case version == 63:
|
||||||
|
|
@ -48,7 +52,6 @@ func isEth63(version int) bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func isEth64(version int) bool {
|
func isEth64(version int) bool {
|
||||||
switch {
|
switch {
|
||||||
case version == 64:
|
case version == 64:
|
||||||
|
|
@ -57,7 +60,6 @@ func isEth64(version int) bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func isEth65(version int) bool {
|
func isEth65(version int) bool {
|
||||||
switch {
|
switch {
|
||||||
case version == 65:
|
case version == 65:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue