MCPcopy Create free account
hub / github.com/CPChain/chain / TestDefaultGenesisBlock

Function TestDefaultGenesisBlock

core/genesis_test.go:32–40  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

30)
31
32func TestDefaultGenesisBlock(t *testing.T) {
33 runmode := configs.GetRunMode()
34 configs.SetRunMode(configs.Mainnet)
35 block := DefaultGenesisBlock().ToBlock(nil)
36 if block.Hash() != MainnetGenesisHash {
37 t.Errorf("wrong mainnet genesis hash, got %v, want %v", block.Hash().Hex(), MainnetGenesisHash.Hex())
38 }
39 configs.SetRunMode(runmode)
40}
41
42func TestSetupGenesis(t *testing.T) {
43 runmode := configs.GetRunMode()

Callers

nothing calls this directly

Calls 3

DefaultGenesisBlockFunction · 0.85
ToBlockMethod · 0.80
HashMethod · 0.65

Tested by

no test coverage detected