Add bitcoin network type for simulation testing.

This commit is contained in:
Dave Collins 2014-05-28 10:28:10 -05:00
parent c4135db728
commit 31ee545aa9
2 changed files with 5 additions and 0 deletions

View file

@ -94,6 +94,9 @@ const (
// TestNet3 represents the test network (version 3).
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
@ -102,6 +105,7 @@ var bnStrings = map[BitcoinNet]string{
MainNet: "MainNet",
TestNet: "TestNet",
TestNet3: "TestNet3",
SimNet: "SimNet",
}
// String returns the BitcoinNet in human-readable form.

View file

@ -40,6 +40,7 @@ func TestBitcoinNetStringer(t *testing.T) {
{btcwire.MainNet, "MainNet"},
{btcwire.TestNet, "TestNet"},
{btcwire.TestNet3, "TestNet3"},
{btcwire.SimNet, "SimNet"},
{0xffffffff, "Unknown BitcoinNet (4294967295)"},
}