"errors"
"math/rand"
"net"
- "time"
wire "github.com/tendermint/go-wire"
"github.com/tendermint/tmlibs/flowrate"
func mockTxs(txCount int) ([]*types.Tx, []*bc.Tx) {
var txs []*types.Tx
var bcTxs []*bc.Tx
- for i := 0; i < txCount; i++ {
- trueProg := mockControlProgram(60)
- assetID := bc.ComputeAssetID(trueProg, 1, &bc.EmptyStringHash)
- now := []byte(time.Now().String())
- issuanceInp := types.NewIssuanceInput(now, 1, trueProg, nil, nil)
+ trueProg := mockControlProgram(60)
+ assetID := bc.AssetID{V0: 9999}
+ for i := uint64(0); i < uint64(txCount); i++ {
tx := types.NewTx(types.TxData{
Version: 1,
- Inputs: []*types.TxInput{issuanceInp},
+ Inputs: []*types.TxInput{types.NewSpendInput(nil, bc.Hash{V0: i + 1}, assetID, i, i, trueProg)},
Outputs: []*types.TxOutput{types.NewIntraChainOutput(assetID, 1, trueProg)},
})
txs = append(txs, tx)