lnd: fix gofmt warnings

This commit is contained in:
Andrey Samokhvalov 2017-02-23 22:02:08 +03:00 committed by Olaoluwa Osuntokun
parent 8fb54782e2
commit f2843dd4c9
5 changed files with 21 additions and 16 deletions

@ -41,7 +41,7 @@ func getTestTxId(miner *rpctest.Harness) (*chainhash.Hash, error) {
}
outputs := []*wire.TxOut{
&wire.TxOut{
{
Value: 2e8,
PkScript: script,
},

@ -46,7 +46,7 @@ var (
testTx = &wire.MsgTx{
Version: 1,
TxIn: []*wire.TxIn{
&wire.TxIn{
{
PreviousOutPoint: wire.OutPoint{
Hash: chainhash.Hash{},
Index: 0xffffffff,
@ -56,7 +56,7 @@ var (
},
},
TxOut: []*wire.TxOut{
&wire.TxOut{
{
Value: 5000000000,
PkScript: []byte{
0x41, // OP_DATA_65

@ -159,7 +159,7 @@ func (b *bobNode) signFundingTx(fundingTx *wire.MsgTx) ([]*lnwallet.InputScript,
inputValue := int64(7e8)
hashCache := txscript.NewTxSigHashes(fundingTx)
for i, _ := range fundingTx.TxIn {
for i := range fundingTx.TxIn {
// Alice has already signed this input.
if fundingTx.TxIn[i].Witness != nil {
continue

@ -4,6 +4,11 @@ import (
"encoding/hex"
"encoding/json"
"errors"
"github.com/lightningnetwork/lnd/channeldb"
"github.com/roasbeef/btcd/btcec"
"github.com/roasbeef/btcd/chaincfg/chainhash"
"github.com/roasbeef/btcd/wire"
"github.com/roasbeef/btcutil"
"io/ioutil"
"math/big"
"net"

@ -16,7 +16,7 @@ import (
var (
outPoints = []wire.OutPoint{
wire.OutPoint{
{
Hash: [chainhash.HashSize]byte{
0x51, 0xb6, 0x37, 0xd8, 0xfc, 0xd2, 0xc6, 0xda,
0x48, 0x59, 0xe6, 0x96, 0x31, 0x13, 0xa1, 0x17,
@ -25,7 +25,7 @@ var (
},
Index: 9,
},
wire.OutPoint{
{
Hash: [chainhash.HashSize]byte{
0xb7, 0x94, 0x38, 0x5f, 0x2d, 0x1e, 0xf7, 0xab,
0x4d, 0x92, 0x73, 0xd1, 0x90, 0x63, 0x81, 0xb4,
@ -34,7 +34,7 @@ var (
},
Index: 49,
},
wire.OutPoint{
{
Hash: [chainhash.HashSize]byte{
0x81, 0xb6, 0x37, 0xd8, 0xfc, 0xd2, 0xc6, 0xda,
0x63, 0x59, 0xe6, 0x96, 0x31, 0x13, 0xa1, 0x17,
@ -46,7 +46,7 @@ var (
}
keys = [][]byte{
[]byte{0x04, 0x11, 0xdb, 0x93, 0xe1, 0xdc, 0xdb, 0x8a,
{0x04, 0x11, 0xdb, 0x93, 0xe1, 0xdc, 0xdb, 0x8a,
0x01, 0x6b, 0x49, 0x84, 0x0f, 0x8c, 0x53, 0xbc, 0x1e,
0xb6, 0x8a, 0x38, 0x2e, 0x97, 0xb1, 0x48, 0x2e, 0xca,
0xd7, 0xb1, 0x48, 0xa6, 0x90, 0x9a, 0x5c, 0xb2, 0xe0,
@ -55,7 +55,7 @@ var (
0xd4, 0xc0, 0x3f, 0x99, 0x9b, 0x86, 0x43, 0xf6, 0x56,
0xb4, 0x12, 0xa3,
},
[]byte{0x07, 0x11, 0xdb, 0x93, 0xe1, 0xdc, 0xdb, 0x8a,
{0x07, 0x11, 0xdb, 0x93, 0xe1, 0xdc, 0xdb, 0x8a,
0x01, 0x6b, 0x49, 0x84, 0x0f, 0x8c, 0x53, 0xbc, 0x1e,
0xb6, 0x8a, 0x38, 0x2e, 0x97, 0xb1, 0x48, 0x2e, 0xca,
0xd7, 0xb1, 0x48, 0xa6, 0x90, 0x9a, 0x5c, 0xb2, 0xe0,
@ -64,7 +64,7 @@ var (
0xd4, 0xc0, 0x3f, 0x99, 0x9b, 0x86, 0x43, 0xf6, 0x56,
0xb4, 0x12, 0xa3,
},
[]byte{0x02, 0xce, 0x0b, 0x14, 0xfb, 0x84, 0x2b, 0x1b,
{0x02, 0xce, 0x0b, 0x14, 0xfb, 0x84, 0x2b, 0x1b,
0xa5, 0x49, 0xfd, 0xd6, 0x75, 0xc9, 0x80, 0x75, 0xf1,
0x2e, 0x9c, 0x51, 0x0f, 0x8e, 0xf5, 0x2b, 0xd0, 0x21,
0xa9, 0xa1, 0xf4, 0x80, 0x9d, 0x3b, 0x4d,
@ -72,7 +72,7 @@ var (
}
signDescriptors = []lnwallet.SignDescriptor{
lnwallet.SignDescriptor{
{
PrivateTweak: []byte{
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
@ -102,7 +102,7 @@ var (
},
HashType: txscript.SigHashAll,
},
lnwallet.SignDescriptor{
{
PrivateTweak: []byte{
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
@ -132,7 +132,7 @@ var (
},
HashType: txscript.SigHashAll,
},
lnwallet.SignDescriptor{
{
PrivateTweak: []byte{
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
@ -165,21 +165,21 @@ var (
}
kidOutputs = []kidOutput{
kidOutput{
{
amt: btcutil.Amount(13e7),
outPoint: outPoints[0],
blocksToMaturity: uint32(100),
confHeight: uint32(1770001),
},
kidOutput{
{
amt: btcutil.Amount(24e7),
outPoint: outPoints[1],
blocksToMaturity: uint32(50),
confHeight: uint32(22342321),
},
kidOutput{
{
amt: btcutil.Amount(2e5),
outPoint: outPoints[2],
blocksToMaturity: uint32(12),