fix -composite literal uses unkeyed fields-

pull/61/head
Minh Doan 6 years ago
parent 88207cf302
commit 9b2f1043af
  1. 2
      client/btctxgen/main.go
  2. 5
      client/txgen/main.go

@ -114,7 +114,7 @@ LOOP:
if btcTXOAddr == nil {
log.Warn("TxOut: can't decode address")
}
txo := blockchain.TXOutput{int(btcTXO.Value), btcTXOAddr.Hash160, nodeShardID}
txo := blockchain.TXOutput{Amount: int(btcTXO.Value), Address: btcTXOAddr.Hash160, ShardID: nodeShardID}
tx.TxOutput = append(tx.TxOutput, txo)
}
tx.SetID()

@ -164,10 +164,7 @@ func generateCrossShardTx(txInfo *TxInfo) {
}
// Spend the utxo from the current shard to a random address in [0 - N)
txout := blockchain.TXOutput{
Amount: txInfo.value,
Address: pki.GetAddressFromInt(rand.Intn(setting.numOfAddress) + 1),
ShardID: nodeShardID}
txout := blockchain.TXOutput{Amount: txInfo.value, Address: pki.GetAddressFromInt(rand.Intn(setting.numOfAddress) + 1), ShardID: nodeShardID}
txOutputs := []blockchain.TXOutput{txout}

Loading…
Cancel
Save