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

Method Rules

configs/general.go:413–419  ·  view source on GitHub ↗

Rules ensures c's ChainID is not nil.

(num *big.Int)

Source from the content-addressed store, hash-verified

411
412// Rules ensures c's ChainID is not nil.
413func (c *ChainConfig) Rules(num *big.Int) Rules {
414 chainID := c.ChainID
415 if chainID == nil {
416 chainID = new(big.Int)
417 }
418 return Rules{ChainID: new(big.Int).Set(chainID), IsCpchain: c.IsCpchain()}
419}

Callers 3

TestRulesIsNotCpchainFunction · 0.95
TestRulesIsCpchainFunction · 0.95
NewEVMFunction · 0.80

Calls 2

IsCpchainMethod · 0.95
SetMethod · 0.45

Tested by 2

TestRulesIsNotCpchainFunction · 0.76
TestRulesIsCpchainFunction · 0.76