예제 #1
0
// This routine generates the Coinbase.  This is a fixed amount to be
// paid to the federated servers.
//
// Currently we are paying just a few fixed addresses.
//
func GetCoinbase(ftime uint64) fct.ITransaction {

	if false && adrs == nil {
		var w wallet.ISCWallet
		w = new(wallet.SCWallet)
		w.Init()

		adrs = make([]fct.IAddress, addressCnt)
		for i := 0; i < addressCnt; i++ {
			adr, _ := w.GenerateFctAddress([]byte("adr"+string(i)), 1, 1)
			adrs[i] = adr
		}
	}

	coinbase := new(fct.Transaction)
	coinbase.SetMilliTimestamp(ftime)

	for _, adr := range adrs {
		coinbase.AddOutput(adr, amount) // add specified amount
	}

	return coinbase
}
예제 #2
0
func (w *SCWallet) CreateTransaction(time uint64) fct.ITransaction {
	t := new(fct.Transaction)
	t.SetMilliTimestamp(time)
	return t
}