Exemple #1
0
func setupMasterVisor() VisorConfig {
	cleanupVisor()
	cipher.SetAddressVersion("test")
	c := NewVisorConfig()
	c.Config.IsMaster = true
	mw := wallet.NewWalletEntry()
	c.Config.MasterKeys = mw
	c.Config.GenesisSignature = createGenesisSignature(mw)
	return c
}
Exemple #2
0
func setupMasterVisorConfig() VisorConfig {
	// Create testmaster.keys file
	cipher.SetAddressVersion("test")
	c := NewVisorConfig()
	c.CoinHourBurnFactor = 0
	c.IsMaster = true
	mw := wallet.NewWalletEntry()
	c.MasterKeys = mw
	c.GenesisSignature = createGenesisSignature(mw)
	return c
}
Exemple #3
0
// Returns an appropriate VisorConfig and a master visor
func setupVisorConfig() (VisorConfig, *Visor) {
	cipher.SetAddressVersion("test")

	// Make a new master visor + blockchain
	// Get the signed genesis block,
	mw := wallet.NewWalletEntry()
	mvc := NewVisorConfig()
	mvc.CoinHourBurnFactor = 0
	mvc.IsMaster = true
	mvc.MasterKeys = mw
	mvc.GenesisSignature = createGenesisSignature(mw)
	mv := NewVisor(mvc)

	// Use the master values for a client configuration
	c := NewVisorConfig()
	c.IsMaster = false
	c.GenesisSignature = mvc.GenesisSignature
	c.GenesisTimestamp = mvc.GenesisTimestamp
	c.MasterKeys = mw
	c.MasterKeys.Secret = cipher.SecKey{}
	c.WalletDirectory = testWalletDir
	return c, mv
}