mirror of
https://github.com/btcsuite/btcd.git
synced 2025-02-23 14:40:44 +01:00
Add bitcoin network type for simulation testing.
This commit is contained in:
parent
c4135db728
commit
31ee545aa9
2 changed files with 5 additions and 0 deletions
|
@ -94,6 +94,9 @@ const (
|
||||||
|
|
||||||
// TestNet3 represents the test network (version 3).
|
// TestNet3 represents the test network (version 3).
|
||||||
TestNet3 BitcoinNet = 0x0709110b
|
TestNet3 BitcoinNet = 0x0709110b
|
||||||
|
|
||||||
|
// SimNet represents the simulation test network.
|
||||||
|
SimNet BitcoinNet = 0x12141c16
|
||||||
)
|
)
|
||||||
|
|
||||||
// bnStrings is a map of bitcoin networks back to their constant names for
|
// bnStrings is a map of bitcoin networks back to their constant names for
|
||||||
|
@ -102,6 +105,7 @@ var bnStrings = map[BitcoinNet]string{
|
||||||
MainNet: "MainNet",
|
MainNet: "MainNet",
|
||||||
TestNet: "TestNet",
|
TestNet: "TestNet",
|
||||||
TestNet3: "TestNet3",
|
TestNet3: "TestNet3",
|
||||||
|
SimNet: "SimNet",
|
||||||
}
|
}
|
||||||
|
|
||||||
// String returns the BitcoinNet in human-readable form.
|
// String returns the BitcoinNet in human-readable form.
|
||||||
|
|
|
@ -40,6 +40,7 @@ func TestBitcoinNetStringer(t *testing.T) {
|
||||||
{btcwire.MainNet, "MainNet"},
|
{btcwire.MainNet, "MainNet"},
|
||||||
{btcwire.TestNet, "TestNet"},
|
{btcwire.TestNet, "TestNet"},
|
||||||
{btcwire.TestNet3, "TestNet3"},
|
{btcwire.TestNet3, "TestNet3"},
|
||||||
|
{btcwire.SimNet, "SimNet"},
|
||||||
{0xffffffff, "Unknown BitcoinNet (4294967295)"},
|
{0xffffffff, "Unknown BitcoinNet (4294967295)"},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue