github.com/arieschain/arieschain@v0.0.0-20191023063405-37c074544356/mobile/params.go (about) 1 // Contains all the wrappers from the params package. 2 3 package geth 4 5 import ( 6 "encoding/json" 7 8 "github.com/quickchainproject/quickchain/core" 9 "github.com/quickchainproject/quickchain/p2p/discv5" 10 "github.com/quickchainproject/quickchain/params" 11 ) 12 13 // MainnetGenesis returns the JSON spec to use for the main Ethereum network. It 14 // is actually empty since that defaults to the hard coded binary genesis block. 15 func MainnetGenesis() string { 16 return "" 17 } 18 19 // TestnetGenesis returns the JSON spec to use for the Ethereum test network. 20 func TestnetGenesis() string { 21 enc, err := json.Marshal(core.DefaultTestnetGenesisBlock()) 22 if err != nil { 23 panic(err) 24 } 25 return string(enc) 26 } 27 28 // RinkebyGenesis returns the JSON spec to use for the Rinkeby test network 29 func RinkebyGenesis() string { 30 enc, err := json.Marshal(core.DefaultGenesisBlock()) 31 if err != nil { 32 panic(err) 33 } 34 return string(enc) 35 } 36 37 // FoundationBootnodes returns the enode URLs of the P2P bootstrap nodes operated 38 // by the foundation running the V5 discovery protocol. 39 func FoundationBootnodes() *Enodes { 40 nodes := &Enodes{nodes: make([]*discv5.Node, len(params.DiscoveryV5Bootnodes))} 41 for i, url := range params.DiscoveryV5Bootnodes { 42 nodes.nodes[i] = discv5.MustParseNode(url) 43 } 44 return nodes 45 }