diff --git a/chain_test.go b/chain_test.go index 37659a02..2f600f1e 100644 --- a/chain_test.go +++ b/chain_test.go @@ -6,6 +6,7 @@ package btcchain_test import ( "github.com/conformal/btcchain" + "github.com/conformal/btcnet" "github.com/conformal/btcutil" "github.com/conformal/btcwire" "testing" @@ -65,7 +66,7 @@ func TestHaveBlock(t *testing.T) { want bool }{ // Genesis block should be present (in the main chain). - {hash: btcwire.GenesisHash.String(), want: true}, + {hash: btcnet.MainNetParams.GenesisHash.String(), want: true}, // Block 3a should be present (on a side chain). {hash: "00000000474284d20067a4d33f6a02284e6ef70764a3a26d6a5b9df52ef663dd", want: true}, diff --git a/common_test.go b/common_test.go index 1cfed1ed..eceb51b5 100644 --- a/common_test.go +++ b/common_test.go @@ -12,7 +12,6 @@ import ( _ "github.com/conformal/btcdb/memdb" "github.com/conformal/btcnet" "github.com/conformal/btcutil" - "github.com/conformal/btcwire" "os" "path/filepath" ) @@ -103,7 +102,7 @@ func chainSetup(dbName string) (*btcchain.BlockChain, func(), error) { // Insert the main network genesis block. This is part of the initial // database setup. - genesisBlock := btcutil.NewBlock(&btcwire.GenesisBlock) + genesisBlock := btcutil.NewBlock(btcnet.MainNetParams.GenesisBlock) _, err := db.InsertBlock(genesisBlock) if err != nil { teardown() diff --git a/validate_test.go b/validate_test.go index 2710e061..596c35c9 100644 --- a/validate_test.go +++ b/validate_test.go @@ -33,7 +33,8 @@ func TestCheckConnectBlock(t *testing.T) { // The genesis block should fail to connect since it's already // inserted. - err = chain.CheckConnectBlock(btcutil.NewBlock(&btcwire.GenesisBlock)) + genesisBlock := btcnet.MainNetParams.GenesisBlock + err = chain.CheckConnectBlock(btcutil.NewBlock(genesisBlock)) if err == nil { t.Errorf("CheckConnectBlock: Did not received expected error") }