From 637c28ba5520debfd0662452e64ef51b8d2853d0 Mon Sep 17 00:00:00 2001 From: whyrusleeping Date: Thu, 28 Nov 2019 22:04:46 -0600 Subject: [PATCH] generator sets up appropriate number of miners --- chain/gen/gen.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/chain/gen/gen.go b/chain/gen/gen.go index 6b8aefccc..9eb841e31 100644 --- a/chain/gen/gen.go +++ b/chain/gen/gen.go @@ -152,10 +152,26 @@ func NewGenerator() (*ChainGen, error) { return nil, err } + maddr2, err := address.NewFromString("t0102") + if err != nil { + return nil, err + } + + m2temp, err := ioutil.TempDir("", "preseal") + if err != nil { + return nil, err + } + + genm2, err := seed.PreSeal(maddr2, 1024, 1, m2temp, []byte("some randomness")) + if err != nil { + return nil, err + } + minercfg := &GenMinerCfg{ PeerIDs: []peer.ID{"peerID1", "peerID2"}, PreSeals: map[string]genesis.GenesisMiner{ maddr1.String(): *genm1, + maddr2.String(): *genm2, }, }