From 9b2f1043afbfee87eac42fa1e0882be14590b78f Mon Sep 17 00:00:00 2001 From: Minh Doan Date: Fri, 24 Aug 2018 12:02:19 -0700 Subject: [PATCH] fix -composite literal uses unkeyed fields- --- client/btctxgen/main.go | 2 +- client/txgen/main.go | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/client/btctxgen/main.go b/client/btctxgen/main.go index 716848028..6abac3879 100644 --- a/client/btctxgen/main.go +++ b/client/btctxgen/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() diff --git a/client/txgen/main.go b/client/txgen/main.go index 18dc6b8b1..950359724 100644 --- a/client/txgen/main.go +++ b/client/txgen/main.go @@ -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}