From 9cfa95d26916af929053141455d873193b4b019e Mon Sep 17 00:00:00 2001 From: David Hill Date: Fri, 11 Apr 2014 14:52:50 -0400 Subject: [PATCH] gofmt --- createtx_test.go | 12 ++++++------ tx/tx_test.go | 46 +++++++++++++++++++++++----------------------- wallet/wallet.go | 2 +- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/createtx_test.go b/createtx_test.go index 3e02fd6..55ddfc3 100644 --- a/createtx_test.go +++ b/createtx_test.go @@ -33,10 +33,10 @@ type allowFreeTest struct { } var allowFreeTests = []allowFreeTest{ - allowFreeTest{ + { name: "priority < 57,600,000", inputs: []*tx.Utxo{ - &tx.Utxo{ + { Amt: uint64(btcutil.SatoshiPerBitcoin), Height: 0, }, @@ -45,10 +45,10 @@ var allowFreeTests = []allowFreeTest{ txSize: 250, free: false, }, - allowFreeTest{ + { name: "priority == 57,600,000", inputs: []*tx.Utxo{ - &tx.Utxo{ + { Amt: uint64(btcutil.SatoshiPerBitcoin), Height: 0, }, @@ -57,10 +57,10 @@ var allowFreeTests = []allowFreeTest{ txSize: 250, free: false, }, - allowFreeTest{ + { name: "priority > 57,600,000", inputs: []*tx.Utxo{ - &tx.Utxo{ + { Amt: uint64(btcutil.SatoshiPerBitcoin), Height: 0, }, diff --git a/tx/tx_test.go b/tx/tx_test.go index 03e6601..ce9a7e2 100644 --- a/tx/tx_test.go +++ b/tx/tx_test.go @@ -112,7 +112,7 @@ func TestTxStore(t *testing.T) { bal: 0, unc: TstRecvTx.MsgTx().TxOut[0].Value, unspents: map[btcwire.OutPoint]struct{}{ - *btcwire.NewOutPoint(TstRecvTx.Sha(), 0): struct{}{}, + *btcwire.NewOutPoint(TstRecvTx.Sha(), 0): {}, }, unmined: map[btcwire.ShaHash]struct{}{}, }, @@ -130,7 +130,7 @@ func TestTxStore(t *testing.T) { bal: 0, unc: TstRecvTx.MsgTx().TxOut[0].Value, unspents: map[btcwire.OutPoint]struct{}{ - *btcwire.NewOutPoint(TstRecvTx.Sha(), 0): struct{}{}, + *btcwire.NewOutPoint(TstRecvTx.Sha(), 0): {}, }, unmined: map[btcwire.ShaHash]struct{}{}, }, @@ -148,7 +148,7 @@ func TestTxStore(t *testing.T) { bal: TstRecvTx.MsgTx().TxOut[0].Value, unc: 0, unspents: map[btcwire.OutPoint]struct{}{ - *btcwire.NewOutPoint(TstRecvTx.Sha(), 0): struct{}{}, + *btcwire.NewOutPoint(TstRecvTx.Sha(), 0): {}, }, unmined: map[btcwire.ShaHash]struct{}{}, }, @@ -166,7 +166,7 @@ func TestTxStore(t *testing.T) { bal: TstRecvTx.MsgTx().TxOut[0].Value, unc: 0, unspents: map[btcwire.OutPoint]struct{}{ - *btcwire.NewOutPoint(TstRecvTx.Sha(), 0): struct{}{}, + *btcwire.NewOutPoint(TstRecvTx.Sha(), 0): {}, }, unmined: map[btcwire.ShaHash]struct{}{}, }, @@ -196,7 +196,7 @@ func TestTxStore(t *testing.T) { bal: TstDoubleSpendTx.MsgTx().TxOut[0].Value, unc: 0, unspents: map[btcwire.OutPoint]struct{}{ - *btcwire.NewOutPoint(TstDoubleSpendTx.Sha(), 0): struct{}{}, + *btcwire.NewOutPoint(TstDoubleSpendTx.Sha(), 0): {}, }, unmined: map[btcwire.ShaHash]struct{}{}, }, @@ -215,7 +215,7 @@ func TestTxStore(t *testing.T) { unc: 0, unspents: map[btcwire.OutPoint]struct{}{}, unmined: map[btcwire.ShaHash]struct{}{ - *TstSpendingTx.Sha(): struct{}{}, + *TstSpendingTx.Sha(): {}, }, }, { @@ -233,7 +233,7 @@ func TestTxStore(t *testing.T) { unc: 0, unspents: map[btcwire.OutPoint]struct{}{}, unmined: map[btcwire.ShaHash]struct{}{ - *TstSpendingTx.Sha(): struct{}{}, + *TstSpendingTx.Sha(): {}, }, }, { @@ -250,10 +250,10 @@ func TestTxStore(t *testing.T) { bal: 0, unc: TstSpendingTx.MsgTx().TxOut[0].Value, unspents: map[btcwire.OutPoint]struct{}{ - *btcwire.NewOutPoint(TstSpendingTx.Sha(), 0): struct{}{}, + *btcwire.NewOutPoint(TstSpendingTx.Sha(), 0): {}, }, unmined: map[btcwire.ShaHash]struct{}{ - *TstSpendingTx.Sha(): struct{}{}, + *TstSpendingTx.Sha(): {}, }, }, { @@ -270,11 +270,11 @@ func TestTxStore(t *testing.T) { bal: 0, unc: TstSpendingTx.MsgTx().TxOut[0].Value + TstSpendingTx.MsgTx().TxOut[1].Value, unspents: map[btcwire.OutPoint]struct{}{ - *btcwire.NewOutPoint(TstSpendingTx.Sha(), 0): struct{}{}, - *btcwire.NewOutPoint(TstSpendingTx.Sha(), 1): struct{}{}, + *btcwire.NewOutPoint(TstSpendingTx.Sha(), 0): {}, + *btcwire.NewOutPoint(TstSpendingTx.Sha(), 1): {}, }, unmined: map[btcwire.ShaHash]struct{}{ - *TstSpendingTx.Sha(): struct{}{}, + *TstSpendingTx.Sha(): {}, }, }, { @@ -291,8 +291,8 @@ func TestTxStore(t *testing.T) { bal: TstSpendingTx.MsgTx().TxOut[0].Value + TstSpendingTx.MsgTx().TxOut[1].Value, unc: 0, unspents: map[btcwire.OutPoint]struct{}{ - *btcwire.NewOutPoint(TstSpendingTx.Sha(), 0): struct{}{}, - *btcwire.NewOutPoint(TstSpendingTx.Sha(), 1): struct{}{}, + *btcwire.NewOutPoint(TstSpendingTx.Sha(), 0): {}, + *btcwire.NewOutPoint(TstSpendingTx.Sha(), 1): {}, }, unmined: map[btcwire.ShaHash]struct{}{}, }, @@ -306,8 +306,8 @@ func TestTxStore(t *testing.T) { bal: TstSpendingTx.MsgTx().TxOut[0].Value + TstSpendingTx.MsgTx().TxOut[1].Value, unc: 0, unspents: map[btcwire.OutPoint]struct{}{ - *btcwire.NewOutPoint(TstSpendingTx.Sha(), 0): struct{}{}, - *btcwire.NewOutPoint(TstSpendingTx.Sha(), 1): struct{}{}, + *btcwire.NewOutPoint(TstSpendingTx.Sha(), 0): {}, + *btcwire.NewOutPoint(TstSpendingTx.Sha(), 1): {}, }, unmined: map[btcwire.ShaHash]struct{}{}, }, @@ -321,11 +321,11 @@ func TestTxStore(t *testing.T) { bal: 0, unc: TstSpendingTx.MsgTx().TxOut[0].Value + TstSpendingTx.MsgTx().TxOut[1].Value, unspents: map[btcwire.OutPoint]struct{}{ - *btcwire.NewOutPoint(TstSpendingTx.Sha(), 0): struct{}{}, - *btcwire.NewOutPoint(TstSpendingTx.Sha(), 1): struct{}{}, + *btcwire.NewOutPoint(TstSpendingTx.Sha(), 0): {}, + *btcwire.NewOutPoint(TstSpendingTx.Sha(), 1): {}, }, unmined: map[btcwire.ShaHash]struct{}{ - *TstSpendingTx.Sha(): struct{}{}, + *TstSpendingTx.Sha(): {}, }, }, { @@ -338,11 +338,11 @@ func TestTxStore(t *testing.T) { bal: 0, unc: TstSpendingTx.MsgTx().TxOut[0].Value + TstSpendingTx.MsgTx().TxOut[1].Value, unspents: map[btcwire.OutPoint]struct{}{ - *btcwire.NewOutPoint(TstSpendingTx.Sha(), 0): struct{}{}, - *btcwire.NewOutPoint(TstSpendingTx.Sha(), 1): struct{}{}, + *btcwire.NewOutPoint(TstSpendingTx.Sha(), 0): {}, + *btcwire.NewOutPoint(TstSpendingTx.Sha(), 1): {}, }, unmined: map[btcwire.ShaHash]struct{}{ - *TstSpendingTx.Sha(): struct{}{}, + *TstSpendingTx.Sha(): {}, }, }, { @@ -359,7 +359,7 @@ func TestTxStore(t *testing.T) { bal: TstRecvTx.MsgTx().TxOut[0].Value, unc: 0, unspents: map[btcwire.OutPoint]struct{}{ - *btcwire.NewOutPoint(TstRecvTx.Sha(), 0): struct{}{}, + *btcwire.NewOutPoint(TstRecvTx.Sha(), 0): {}, }, unmined: map[btcwire.ShaHash]struct{}{}, }, diff --git a/wallet/wallet.go b/wallet/wallet.go index dbe0d82..4f419a9 100644 --- a/wallet/wallet.go +++ b/wallet/wallet.go @@ -2492,7 +2492,7 @@ func (a *btcAddress) ExportPubKey() string { return hex.EncodeToString(a.pubKeyBytes()) } -// PrivKey implements PubKeyAddress by returning the private key, or an error +// PrivKey implements PubKeyAddress by returning the private key, or an error // if th wallet is locked, watching only or the private key is missing. func (a *btcAddress) PrivKey() (*ecdsa.PrivateKey, error) { if a.wallet.flags.watchingOnly {