forked from TrueCloudLab/neoneo-go
netmode: make default Magic String() more useful
This commit is contained in:
parent
26f11a52d9
commit
78ff11fe53
1 changed files with 3 additions and 1 deletions
|
@ -1,5 +1,7 @@
|
||||||
package netmode
|
package netmode
|
||||||
|
|
||||||
|
import "strconv"
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// MainNet contains magic code used in the NEO main official network.
|
// MainNet contains magic code used in the NEO main official network.
|
||||||
MainNet Magic = 0x004f454e // 5195086
|
MainNet Magic = 0x004f454e // 5195086
|
||||||
|
@ -26,6 +28,6 @@ func (n Magic) String() string {
|
||||||
case UnitTestNet:
|
case UnitTestNet:
|
||||||
return "unit_testnet"
|
return "unit_testnet"
|
||||||
default:
|
default:
|
||||||
return "net unknown"
|
return "net 0x" + strconv.FormatUint(uint64(n), 16)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue