func TestCheckBlockSanity(t *testing.T) { powLimit := btcchain.ChainParams(btcwire.MainNet).PowLimit block := btcutil.NewBlock(&Block100000) err := btcchain.CheckBlockSanity(block, powLimit) if err != nil { t.Errorf("CheckBlockSanity: %v", err) } }
genesisBlock *btcwire.MsgBlock genesisHash *btcwire.ShaHash powLimit *big.Int powLimitBits uint32 peerPort string listenPort string rpcPort string dnsSeeds []string } // mainNetParams contains parameters specific to the main network // (btcwire.MainNet). var mainNetParams = params{ netName: "mainnet", btcnet: btcwire.MainNet, genesisBlock: btcchain.ChainParams(btcwire.MainNet).GenesisBlock, genesisHash: btcchain.ChainParams(btcwire.MainNet).GenesisHash, powLimit: btcchain.ChainParams(btcwire.MainNet).PowLimit, powLimitBits: btcchain.ChainParams(btcwire.MainNet).PowLimitBits, listenPort: btcwire.MainPort, peerPort: btcwire.MainPort, rpcPort: "8332", dnsSeeds: []string{ "seed.bitcoin.sipa.be", "dnsseed.bluematt.me", "dnsseed.bitcoin.dashjr.org", "bitseed.xf2.org", }, } // regressionParams contains parameters specific to the regression test network