// Creates a new blockchain with a single genesis block. // Returns the visor and signed genesis block func createGenesisVisor(masterKeys, bcFile, bsFile string) (*visor.Visor, visor.SignedBlock, error) { we := visor.MustLoadWalletEntry(masterKeys) c := visor.NewVisorConfig() c.MasterKeys = we c.IsMaster = true c.BlockSigsFile = bsFile c.BlockchainFile = bcFile c.CoinHourBurnFactor = 0 v := visor.NewMinimalVisor(c) v.Wallet = visor.CreateMasterWallet(c.MasterKeys) return v, v.CreateGenesisBlock(), nil }
func (self *VisorConfig) LoadMasterKeys() { if self.Disabled { return } self.Config.MasterKeys = visor.MustLoadWalletEntry(self.MasterKeysFile) }