From 1ded697e8d504b97457b010d8437703692c211b7 Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Tue, 31 Jul 2018 00:17:17 -0700 Subject: [PATCH] multi: sort import paths with gofmt --- autopilot/agent.go | 4 ++-- autopilot/graph.go | 4 ++-- autopilot/interface.go | 2 +- autopilot/prefattach_test.go | 4 ++-- brontide/conn.go | 2 +- brontide/noise_test.go | 2 +- chainntnfs/bitcoindnotify/driver.go | 2 +- chainntnfs/btcdnotify/driver.go | 2 +- chan_series.go | 2 +- chancloser.go | 6 +++--- channeldb/codec.go | 6 +++--- channeldb/forwarding_package_test.go | 2 +- cmd/lncli/commands.go | 4 ++-- cmd/lncli/main.go | 2 +- contractcourt/briefcase.go | 4 ++-- contractcourt/briefcase_test.go | 8 ++++---- discovery/ann_validation.go | 4 ++-- discovery/bootstrapper.go | 4 ++-- discovery/utils.go | 2 +- htlcswitch/circuit_test.go | 6 +++--- htlcswitch/failure.go | 2 +- htlcswitch/iterator.go | 2 +- htlcswitch/switch_test.go | 2 +- htlcswitch/test_utils.go | 8 ++++---- lntest/harness.go | 2 +- lntest/node.go | 6 +++--- lnwallet/btcwallet/driver.go | 2 +- lnwallet/btcwallet/signer.go | 6 +++--- lnwallet/config.go | 2 +- lnwallet/errors.go | 2 +- lnwallet/fee_estimator_test.go | 2 +- lnwallet/reservation.go | 4 ++-- lnwallet/signdescriptor.go | 2 +- lnwallet/signdescriptor_test.go | 2 +- lnwallet/sigpool.go | 2 +- lnwallet/size_test.go | 2 +- lnwallet/test_utils.go | 8 ++++---- lnwallet/transactions_test.go | 10 +++++----- macaroons/constraints_test.go | 4 ++-- macaroons/service_test.go | 12 ++++++------ nodesigner.go | 2 +- nursery_store.go | 4 ++-- nursery_store_test.go | 2 +- peer_test.go | 4 ++-- routing/missioncontrol.go | 2 +- routing/notifications.go | 6 +++--- routing/pathfind.go | 6 +++--- routing/pathfind_test.go | 4 ++-- rpcserver.go | 16 ++++++++-------- shachain/store.go | 2 +- utxonursery_test.go | 2 +- walletunlocker/service.go | 6 +++--- walletunlocker/service_test.go | 6 +++--- witness_beacon.go | 2 +- zpay32/invoice.go | 4 ++-- zpay32/invoice_internal_test.go | 4 ++-- zpay32/invoice_test.go | 4 ++-- 57 files changed, 115 insertions(+), 115 deletions(-) diff --git a/autopilot/agent.go b/autopilot/agent.go index 732c2d16..b3509116 100644 --- a/autopilot/agent.go +++ b/autopilot/agent.go @@ -4,10 +4,10 @@ import ( "sync" "sync/atomic" - "github.com/davecgh/go-spew/spew" - "github.com/lightningnetwork/lnd/lnwire" "github.com/btcsuite/btcd/btcec" "github.com/btcsuite/btcutil" + "github.com/davecgh/go-spew/spew" + "github.com/lightningnetwork/lnd/lnwire" ) // Config couples all the items that an autopilot agent needs to function. diff --git a/autopilot/graph.go b/autopilot/graph.go index 70589801..036579d0 100644 --- a/autopilot/graph.go +++ b/autopilot/graph.go @@ -7,11 +7,11 @@ import ( "sync/atomic" "time" + "github.com/btcsuite/btcd/btcec" + "github.com/btcsuite/btcutil" "github.com/coreos/bbolt" "github.com/lightningnetwork/lnd/channeldb" "github.com/lightningnetwork/lnd/lnwire" - "github.com/btcsuite/btcd/btcec" - "github.com/btcsuite/btcutil" ) var ( diff --git a/autopilot/interface.go b/autopilot/interface.go index 00bed01f..8c94d6d7 100644 --- a/autopilot/interface.go +++ b/autopilot/interface.go @@ -3,10 +3,10 @@ package autopilot import ( "net" - "github.com/lightningnetwork/lnd/lnwire" "github.com/btcsuite/btcd/btcec" "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcutil" + "github.com/lightningnetwork/lnd/lnwire" ) // Node node is an interface which represents n abstract vertex within the diff --git a/autopilot/prefattach_test.go b/autopilot/prefattach_test.go index 1e210be2..e4a7fcf2 100644 --- a/autopilot/prefattach_test.go +++ b/autopilot/prefattach_test.go @@ -8,10 +8,10 @@ import ( prand "math/rand" - "github.com/lightningnetwork/lnd/channeldb" - "github.com/lightningnetwork/lnd/lnwire" "github.com/btcsuite/btcd/btcec" "github.com/btcsuite/btcutil" + "github.com/lightningnetwork/lnd/channeldb" + "github.com/lightningnetwork/lnd/lnwire" ) func TestConstrainedPrefAttachmentNeedMoreChan(t *testing.T) { diff --git a/brontide/conn.go b/brontide/conn.go index 4a7c5a66..e5bfecc1 100644 --- a/brontide/conn.go +++ b/brontide/conn.go @@ -7,8 +7,8 @@ import ( "net" "time" - "github.com/lightningnetwork/lnd/lnwire" "github.com/btcsuite/btcd/btcec" + "github.com/lightningnetwork/lnd/lnwire" ) // Conn is an implementation of net.Conn which enforces an authenticated key diff --git a/brontide/noise_test.go b/brontide/noise_test.go index 8259aa58..1918a646 100644 --- a/brontide/noise_test.go +++ b/brontide/noise_test.go @@ -9,8 +9,8 @@ import ( "sync" "testing" - "github.com/lightningnetwork/lnd/lnwire" "github.com/btcsuite/btcd/btcec" + "github.com/lightningnetwork/lnd/lnwire" ) type maybeNetConn struct { diff --git a/chainntnfs/bitcoindnotify/driver.go b/chainntnfs/bitcoindnotify/driver.go index fe1fcf65..b2c0efc9 100644 --- a/chainntnfs/bitcoindnotify/driver.go +++ b/chainntnfs/bitcoindnotify/driver.go @@ -3,9 +3,9 @@ package bitcoindnotify import ( "fmt" - "github.com/lightningnetwork/lnd/chainntnfs" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/rpcclient" + "github.com/lightningnetwork/lnd/chainntnfs" ) // createNewNotifier creates a new instance of the ChainNotifier interface diff --git a/chainntnfs/btcdnotify/driver.go b/chainntnfs/btcdnotify/driver.go index 94bde52f..19e405a1 100644 --- a/chainntnfs/btcdnotify/driver.go +++ b/chainntnfs/btcdnotify/driver.go @@ -3,8 +3,8 @@ package btcdnotify import ( "fmt" - "github.com/lightningnetwork/lnd/chainntnfs" "github.com/btcsuite/btcd/rpcclient" + "github.com/lightningnetwork/lnd/chainntnfs" ) // createNewNotifier creates a new instance of the ChainNotifier interface diff --git a/chan_series.go b/chan_series.go index b5cc3913..0088c7ec 100644 --- a/chan_series.go +++ b/chan_series.go @@ -3,11 +3,11 @@ package main import ( "time" + "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/lightningnetwork/lnd/channeldb" "github.com/lightningnetwork/lnd/discovery" "github.com/lightningnetwork/lnd/lnwire" "github.com/lightningnetwork/lnd/routing" - "github.com/btcsuite/btcd/chaincfg/chainhash" ) // chanSeries is an implementation of the discovery.ChannelGraphTimeSeries diff --git a/chancloser.go b/chancloser.go index edad8102..bce0e8a5 100644 --- a/chancloser.go +++ b/chancloser.go @@ -3,13 +3,13 @@ package main import ( "fmt" + "github.com/btcsuite/btcd/txscript" + "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcutil" "github.com/davecgh/go-spew/spew" "github.com/lightningnetwork/lnd/htlcswitch" "github.com/lightningnetwork/lnd/lnwallet" "github.com/lightningnetwork/lnd/lnwire" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" ) var ( diff --git a/channeldb/codec.go b/channeldb/codec.go index d0472ff7..f491a8c1 100644 --- a/channeldb/codec.go +++ b/channeldb/codec.go @@ -6,13 +6,13 @@ import ( "io" "net" - "github.com/lightningnetwork/lnd/keychain" - "github.com/lightningnetwork/lnd/lnwire" - "github.com/lightningnetwork/lnd/shachain" "github.com/btcsuite/btcd/btcec" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcutil" + "github.com/lightningnetwork/lnd/keychain" + "github.com/lightningnetwork/lnd/lnwire" + "github.com/lightningnetwork/lnd/shachain" ) // outPointSize is the size of a serialized outpoint on disk. diff --git a/channeldb/forwarding_package_test.go b/channeldb/forwarding_package_test.go index 7f351214..83120745 100644 --- a/channeldb/forwarding_package_test.go +++ b/channeldb/forwarding_package_test.go @@ -7,10 +7,10 @@ import ( "runtime" "testing" + "github.com/btcsuite/btcd/wire" "github.com/coreos/bbolt" "github.com/lightningnetwork/lnd/channeldb" "github.com/lightningnetwork/lnd/lnwire" - "github.com/btcsuite/btcd/wire" ) // TestPkgFilterBruteForce tests the behavior of a pkg filter up to size 1000, diff --git a/cmd/lncli/commands.go b/cmd/lncli/commands.go index 92dae940..e74fb478 100644 --- a/cmd/lncli/commands.go +++ b/cmd/lncli/commands.go @@ -18,11 +18,11 @@ import ( "syscall" "github.com/awalterschulze/gographviz" + "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/btcsuite/btcutil" "github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/proto" "github.com/lightningnetwork/lnd/lnrpc" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcutil" "github.com/urfave/cli" "golang.org/x/crypto/ssh/terminal" "golang.org/x/net/context" diff --git a/cmd/lncli/main.go b/cmd/lncli/main.go index 1b6c6b64..608023ab 100644 --- a/cmd/lncli/main.go +++ b/cmd/lncli/main.go @@ -14,10 +14,10 @@ import ( macaroon "gopkg.in/macaroon.v2" + "github.com/btcsuite/btcutil" "github.com/lightningnetwork/lnd/lncfg" "github.com/lightningnetwork/lnd/lnrpc" "github.com/lightningnetwork/lnd/macaroons" - "github.com/btcsuite/btcutil" "github.com/urfave/cli" "google.golang.org/grpc" diff --git a/contractcourt/briefcase.go b/contractcourt/briefcase.go index 413ede37..d7da21ea 100644 --- a/contractcourt/briefcase.go +++ b/contractcourt/briefcase.go @@ -6,11 +6,11 @@ import ( "fmt" "io" + "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/btcsuite/btcd/wire" "github.com/coreos/bbolt" "github.com/lightningnetwork/lnd/channeldb" "github.com/lightningnetwork/lnd/lnwallet" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" ) // ContractResolutions is a wrapper struct around the two forms of resolutions diff --git a/contractcourt/briefcase_test.go b/contractcourt/briefcase_test.go index b5dcf327..622fba2c 100644 --- a/contractcourt/briefcase_test.go +++ b/contractcourt/briefcase_test.go @@ -10,15 +10,15 @@ import ( prand "math/rand" + "github.com/btcsuite/btcd/btcec" + "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/btcsuite/btcd/txscript" + "github.com/btcsuite/btcd/wire" "github.com/coreos/bbolt" "github.com/davecgh/go-spew/spew" "github.com/lightningnetwork/lnd/channeldb" "github.com/lightningnetwork/lnd/lnwallet" "github.com/lightningnetwork/lnd/lnwire" - "github.com/btcsuite/btcd/btcec" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" ) var ( diff --git a/discovery/ann_validation.go b/discovery/ann_validation.go index 534bc48d..6ca07f64 100644 --- a/discovery/ann_validation.go +++ b/discovery/ann_validation.go @@ -3,11 +3,11 @@ package discovery import ( "bytes" + "github.com/btcsuite/btcd/btcec" + "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/davecgh/go-spew/spew" "github.com/go-errors/errors" "github.com/lightningnetwork/lnd/lnwire" - "github.com/btcsuite/btcd/btcec" - "github.com/btcsuite/btcd/chaincfg/chainhash" ) // ValidateChannelAnn validates the channel announcement message and checks diff --git a/discovery/bootstrapper.go b/discovery/bootstrapper.go index 0dd64e43..35782d6d 100644 --- a/discovery/bootstrapper.go +++ b/discovery/bootstrapper.go @@ -12,13 +12,13 @@ import ( "strings" "time" + "github.com/btcsuite/btcd/btcec" + "github.com/btcsuite/btcutil/bech32" "github.com/davecgh/go-spew/spew" "github.com/lightningnetwork/lnd/autopilot" "github.com/lightningnetwork/lnd/lnwire" "github.com/lightningnetwork/lnd/tor" "github.com/miekg/dns" - "github.com/btcsuite/btcd/btcec" - "github.com/btcsuite/btcutil/bech32" ) func init() { diff --git a/discovery/utils.go b/discovery/utils.go index 89a81b27..0cbc9470 100644 --- a/discovery/utils.go +++ b/discovery/utils.go @@ -1,11 +1,11 @@ package discovery import ( + "github.com/btcsuite/btcd/btcec" "github.com/go-errors/errors" "github.com/lightningnetwork/lnd/channeldb" "github.com/lightningnetwork/lnd/lnwallet" "github.com/lightningnetwork/lnd/lnwire" - "github.com/btcsuite/btcd/btcec" ) // CreateChanAnnouncement is a helper function which creates all channel diff --git a/htlcswitch/circuit_test.go b/htlcswitch/circuit_test.go index c6f86e76..8ffc2efa 100644 --- a/htlcswitch/circuit_test.go +++ b/htlcswitch/circuit_test.go @@ -6,13 +6,13 @@ import ( "reflect" "testing" + "github.com/btcsuite/btcd/btcec" + bitcoinCfg "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcutil" "github.com/lightningnetwork/lightning-onion" "github.com/lightningnetwork/lnd/channeldb" "github.com/lightningnetwork/lnd/htlcswitch" "github.com/lightningnetwork/lnd/lnwire" - "github.com/btcsuite/btcd/btcec" - bitcoinCfg "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcutil" ) var ( diff --git a/htlcswitch/failure.go b/htlcswitch/failure.go index 61caa8a9..d9edb145 100644 --- a/htlcswitch/failure.go +++ b/htlcswitch/failure.go @@ -5,9 +5,9 @@ import ( "fmt" "io" + "github.com/btcsuite/btcd/btcec" "github.com/lightningnetwork/lightning-onion" "github.com/lightningnetwork/lnd/lnwire" - "github.com/btcsuite/btcd/btcec" ) // ForwardingError wraps an lnwire.FailureMessage in a struct that also diff --git a/htlcswitch/iterator.go b/htlcswitch/iterator.go index 9a873ddc..a068000d 100644 --- a/htlcswitch/iterator.go +++ b/htlcswitch/iterator.go @@ -4,9 +4,9 @@ import ( "encoding/binary" "io" + "github.com/btcsuite/btcd/btcec" "github.com/lightningnetwork/lightning-onion" "github.com/lightningnetwork/lnd/lnwire" - "github.com/btcsuite/btcd/btcec" ) // NetworkHop indicates the blockchain network that is intended to be the next diff --git a/htlcswitch/switch_test.go b/htlcswitch/switch_test.go index f496113d..904113e4 100644 --- a/htlcswitch/switch_test.go +++ b/htlcswitch/switch_test.go @@ -9,12 +9,12 @@ import ( "testing" "time" + "github.com/btcsuite/btcutil" "github.com/btcsuite/fastsha256" "github.com/davecgh/go-spew/spew" "github.com/go-errors/errors" "github.com/lightningnetwork/lnd/channeldb" "github.com/lightningnetwork/lnd/lnwire" - "github.com/btcsuite/btcutil" ) func genPreimage() ([32]byte, error) { diff --git a/htlcswitch/test_utils.go b/htlcswitch/test_utils.go index 3f257a87..46bf718f 100644 --- a/htlcswitch/test_utils.go +++ b/htlcswitch/test_utils.go @@ -14,6 +14,10 @@ import ( "testing" "time" + "github.com/btcsuite/btcd/btcec" + "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcutil" "github.com/btcsuite/fastsha256" "github.com/coreos/bbolt" "github.com/go-errors/errors" @@ -24,10 +28,6 @@ import ( "github.com/lightningnetwork/lnd/lnwallet" "github.com/lightningnetwork/lnd/lnwire" "github.com/lightningnetwork/lnd/shachain" - "github.com/btcsuite/btcd/btcec" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" ) var ( diff --git a/lntest/harness.go b/lntest/harness.go index c173ac1e..517645b2 100644 --- a/lntest/harness.go +++ b/lntest/harness.go @@ -11,7 +11,6 @@ import ( "golang.org/x/net/context" "google.golang.org/grpc/grpclog" - "github.com/lightningnetwork/lnd/lnrpc" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/integration/rpctest" @@ -19,6 +18,7 @@ import ( "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcutil" + "github.com/lightningnetwork/lnd/lnrpc" ) // NetworkHarness is an integration testing harness for the lightning network. diff --git a/lntest/node.go b/lntest/node.go index a33e0e29..0deae50d 100644 --- a/lntest/node.go +++ b/lntest/node.go @@ -20,13 +20,13 @@ import ( "google.golang.org/grpc/credentials" macaroon "gopkg.in/macaroon.v2" - "github.com/go-errors/errors" - "github.com/lightningnetwork/lnd/lnrpc" - "github.com/lightningnetwork/lnd/macaroons" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/rpcclient" "github.com/btcsuite/btcd/wire" + "github.com/go-errors/errors" + "github.com/lightningnetwork/lnd/lnrpc" + "github.com/lightningnetwork/lnd/macaroons" ) var ( diff --git a/lnwallet/btcwallet/driver.go b/lnwallet/btcwallet/driver.go index 73f94605..4939c16f 100644 --- a/lnwallet/btcwallet/driver.go +++ b/lnwallet/btcwallet/driver.go @@ -3,8 +3,8 @@ package btcwallet import ( "fmt" - "github.com/lightningnetwork/lnd/lnwallet" "github.com/btcsuite/btcwallet/chain" + "github.com/lightningnetwork/lnd/lnwallet" ) const ( diff --git a/lnwallet/btcwallet/signer.go b/lnwallet/btcwallet/signer.go index 3b4ebe99..e930908c 100644 --- a/lnwallet/btcwallet/signer.go +++ b/lnwallet/btcwallet/signer.go @@ -1,9 +1,6 @@ package btcwallet import ( - "github.com/go-errors/errors" - "github.com/lightningnetwork/lnd/keychain" - "github.com/lightningnetwork/lnd/lnwallet" "github.com/btcsuite/btcd/btcec" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/txscript" @@ -12,6 +9,9 @@ import ( "github.com/btcsuite/btcwallet/waddrmgr" base "github.com/btcsuite/btcwallet/wallet" "github.com/btcsuite/btcwallet/walletdb" + "github.com/go-errors/errors" + "github.com/lightningnetwork/lnd/keychain" + "github.com/lightningnetwork/lnd/lnwallet" ) // FetchInputInfo queries for the WalletController's knowledge of the passed diff --git a/lnwallet/config.go b/lnwallet/config.go index 7075551d..350adace 100644 --- a/lnwallet/config.go +++ b/lnwallet/config.go @@ -1,10 +1,10 @@ package lnwallet import ( + "github.com/btcsuite/btcd/chaincfg" "github.com/lightningnetwork/lnd/chainntnfs" "github.com/lightningnetwork/lnd/channeldb" "github.com/lightningnetwork/lnd/keychain" - "github.com/btcsuite/btcd/chaincfg" ) // Config is a struct which houses configuration parameters which modify the diff --git a/lnwallet/errors.go b/lnwallet/errors.go index f4aee380..a1f83edf 100644 --- a/lnwallet/errors.go +++ b/lnwallet/errors.go @@ -4,9 +4,9 @@ import ( "errors" "fmt" - "github.com/lightningnetwork/lnd/lnwire" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcutil" + "github.com/lightningnetwork/lnd/lnwire" ) // ReservationError wraps certain errors returned during channel reservation diff --git a/lnwallet/fee_estimator_test.go b/lnwallet/fee_estimator_test.go index 40aaa30a..0fa97ead 100644 --- a/lnwallet/fee_estimator_test.go +++ b/lnwallet/fee_estimator_test.go @@ -3,8 +3,8 @@ package lnwallet_test import ( "testing" - "github.com/lightningnetwork/lnd/lnwallet" "github.com/btcsuite/btcutil" + "github.com/lightningnetwork/lnd/lnwallet" ) // TestFeeRateTypes checks that converting fee rates between the diff --git a/lnwallet/reservation.go b/lnwallet/reservation.go index f89945d6..9d752c56 100644 --- a/lnwallet/reservation.go +++ b/lnwallet/reservation.go @@ -4,12 +4,12 @@ import ( "net" "sync" - "github.com/lightningnetwork/lnd/channeldb" - "github.com/lightningnetwork/lnd/lnwire" "github.com/btcsuite/btcd/btcec" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcutil" + "github.com/lightningnetwork/lnd/channeldb" + "github.com/lightningnetwork/lnd/lnwire" ) // ChannelContribution is the primary constituent of the funding workflow diff --git a/lnwallet/signdescriptor.go b/lnwallet/signdescriptor.go index 6df58af7..de8b8851 100644 --- a/lnwallet/signdescriptor.go +++ b/lnwallet/signdescriptor.go @@ -5,10 +5,10 @@ import ( "errors" "io" - "github.com/lightningnetwork/lnd/keychain" "github.com/btcsuite/btcd/btcec" "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcd/wire" + "github.com/lightningnetwork/lnd/keychain" ) var ( diff --git a/lnwallet/signdescriptor_test.go b/lnwallet/signdescriptor_test.go index 6b8d3713..7f9d8eef 100644 --- a/lnwallet/signdescriptor_test.go +++ b/lnwallet/signdescriptor_test.go @@ -5,10 +5,10 @@ import ( "reflect" "testing" - "github.com/lightningnetwork/lnd/keychain" "github.com/btcsuite/btcd/btcec" "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcd/wire" + "github.com/lightningnetwork/lnd/keychain" ) func TestSignDescriptorSerialization(t *testing.T) { diff --git a/lnwallet/sigpool.go b/lnwallet/sigpool.go index 780381c7..7e8015fc 100644 --- a/lnwallet/sigpool.go +++ b/lnwallet/sigpool.go @@ -5,9 +5,9 @@ import ( "sync" "sync/atomic" - "github.com/lightningnetwork/lnd/lnwire" "github.com/btcsuite/btcd/btcec" "github.com/btcsuite/btcd/wire" + "github.com/lightningnetwork/lnd/lnwire" ) const ( diff --git a/lnwallet/size_test.go b/lnwallet/size_test.go index 216fcbe3..e99588f1 100644 --- a/lnwallet/size_test.go +++ b/lnwallet/size_test.go @@ -3,12 +3,12 @@ package lnwallet_test import ( "testing" - "github.com/lightningnetwork/lnd/lnwallet" "github.com/btcsuite/btcd/blockchain" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcutil" + "github.com/lightningnetwork/lnd/lnwallet" ) // TestTxWeightEstimator tests that transaction weight estimates are calculated diff --git a/lnwallet/test_utils.go b/lnwallet/test_utils.go index 5c79b452..03cd8513 100644 --- a/lnwallet/test_utils.go +++ b/lnwallet/test_utils.go @@ -12,16 +12,16 @@ import ( "os" "sync" - "github.com/lightningnetwork/lnd/channeldb" - "github.com/lightningnetwork/lnd/keychain" - "github.com/lightningnetwork/lnd/lnwire" - "github.com/lightningnetwork/lnd/shachain" "github.com/btcsuite/btcd/btcec" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcutil" + "github.com/lightningnetwork/lnd/channeldb" + "github.com/lightningnetwork/lnd/keychain" + "github.com/lightningnetwork/lnd/lnwire" + "github.com/lightningnetwork/lnd/shachain" ) var ( diff --git a/lnwallet/transactions_test.go b/lnwallet/transactions_test.go index f125838a..c3b50b04 100644 --- a/lnwallet/transactions_test.go +++ b/lnwallet/transactions_test.go @@ -6,16 +6,16 @@ import ( "fmt" "testing" - "github.com/davecgh/go-spew/spew" - "github.com/lightningnetwork/lnd/channeldb" - "github.com/lightningnetwork/lnd/keychain" - "github.com/lightningnetwork/lnd/lnwire" - "github.com/lightningnetwork/lnd/shachain" "github.com/btcsuite/btcd/btcec" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcutil" + "github.com/davecgh/go-spew/spew" + "github.com/lightningnetwork/lnd/channeldb" + "github.com/lightningnetwork/lnd/keychain" + "github.com/lightningnetwork/lnd/lnwire" + "github.com/lightningnetwork/lnd/shachain" ) /** diff --git a/macaroons/constraints_test.go b/macaroons/constraints_test.go index 694d7841..a0e7c67e 100644 --- a/macaroons/constraints_test.go +++ b/macaroons/constraints_test.go @@ -1,11 +1,11 @@ package macaroons_test import ( - "testing" "github.com/lightningnetwork/lnd/macaroons" "gopkg.in/macaroon.v2" - "time" "strings" + "testing" + "time" ) var ( diff --git a/macaroons/service_test.go b/macaroons/service_test.go index 599bcb88..f7164afe 100644 --- a/macaroons/service_test.go +++ b/macaroons/service_test.go @@ -1,18 +1,18 @@ package macaroons_test import ( - "testing" - "path" - "os" "context" - "io/ioutil" "encoding/hex" + "io/ioutil" + "os" + "path" + "testing" "github.com/coreos/bbolt" "github.com/lightningnetwork/lnd/macaroons" - "gopkg.in/macaroon-bakery.v2/bakery/checkers" - "gopkg.in/macaroon-bakery.v2/bakery" "google.golang.org/grpc/metadata" + "gopkg.in/macaroon-bakery.v2/bakery" + "gopkg.in/macaroon-bakery.v2/bakery/checkers" ) var ( diff --git a/nodesigner.go b/nodesigner.go index b40af48c..b40bce48 100644 --- a/nodesigner.go +++ b/nodesigner.go @@ -3,9 +3,9 @@ package main import ( "fmt" - "github.com/lightningnetwork/lnd/lnwallet" "github.com/btcsuite/btcd/btcec" "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/lightningnetwork/lnd/lnwallet" ) // nodeSigner is an implementation of the MessageSigner interface backed by the diff --git a/nursery_store.go b/nursery_store.go index 278ecd79..4b6edbc0 100644 --- a/nursery_store.go +++ b/nursery_store.go @@ -5,10 +5,10 @@ import ( "errors" "fmt" - "github.com/coreos/bbolt" - "github.com/lightningnetwork/lnd/channeldb" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/wire" + "github.com/coreos/bbolt" + "github.com/lightningnetwork/lnd/channeldb" ) // Overview of Nursery Store Storage Hierarchy diff --git a/nursery_store_test.go b/nursery_store_test.go index db7dcf1d..16723abb 100644 --- a/nursery_store_test.go +++ b/nursery_store_test.go @@ -8,9 +8,9 @@ import ( "reflect" "testing" + "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btclog" "github.com/lightningnetwork/lnd/channeldb" - "github.com/btcsuite/btcd/wire" ) func init() { diff --git a/peer_test.go b/peer_test.go index 160a2784..2b711287 100644 --- a/peer_test.go +++ b/peer_test.go @@ -6,7 +6,9 @@ import ( "testing" "time" + "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btclog" + "github.com/btcsuite/btcutil" "github.com/lightningnetwork/lnd/chainntnfs" "github.com/lightningnetwork/lnd/channeldb" "github.com/lightningnetwork/lnd/contractcourt" @@ -14,8 +16,6 @@ import ( "github.com/lightningnetwork/lnd/lnrpc" "github.com/lightningnetwork/lnd/lnwallet" "github.com/lightningnetwork/lnd/lnwire" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" ) func init() { diff --git a/routing/missioncontrol.go b/routing/missioncontrol.go index 5f64b510..bebac9ba 100644 --- a/routing/missioncontrol.go +++ b/routing/missioncontrol.go @@ -5,10 +5,10 @@ import ( "sync" "time" + "github.com/btcsuite/btcd/btcec" "github.com/coreos/bbolt" "github.com/lightningnetwork/lnd/channeldb" "github.com/lightningnetwork/lnd/lnwire" - "github.com/btcsuite/btcd/btcec" ) const ( diff --git a/routing/notifications.go b/routing/notifications.go index a8e8a93c..64958228 100644 --- a/routing/notifications.go +++ b/routing/notifications.go @@ -6,13 +6,13 @@ import ( "sync" "sync/atomic" + "github.com/btcsuite/btcd/btcec" + "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcutil" "github.com/davecgh/go-spew/spew" "github.com/go-errors/errors" "github.com/lightningnetwork/lnd/channeldb" "github.com/lightningnetwork/lnd/lnwire" - "github.com/btcsuite/btcd/btcec" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" ) // TopologyClient represents an intent to receive notifications from the diff --git a/routing/pathfind.go b/routing/pathfind.go index 55b6a1ec..456f2ced 100644 --- a/routing/pathfind.go +++ b/routing/pathfind.go @@ -8,13 +8,13 @@ import ( "container/heap" + "github.com/btcsuite/btcd/btcec" + "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/btcsuite/btcutil" "github.com/coreos/bbolt" "github.com/lightningnetwork/lightning-onion" "github.com/lightningnetwork/lnd/channeldb" "github.com/lightningnetwork/lnd/lnwire" - "github.com/btcsuite/btcd/btcec" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcutil" ) const ( diff --git a/routing/pathfind_test.go b/routing/pathfind_test.go index 6037d406..82ea1517 100644 --- a/routing/pathfind_test.go +++ b/routing/pathfind_test.go @@ -16,12 +16,12 @@ import ( "testing" "time" - "github.com/lightningnetwork/lnd/channeldb" - "github.com/lightningnetwork/lnd/lnwire" "github.com/btcsuite/btcd/btcec" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcutil" + "github.com/lightningnetwork/lnd/channeldb" + "github.com/lightningnetwork/lnd/lnwire" prand "math/rand" ) diff --git a/rpcserver.go b/rpcserver.go index 42e27b41..698586ed 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -18,6 +18,13 @@ import ( "sync/atomic" + "github.com/btcsuite/btcd/blockchain" + "github.com/btcsuite/btcd/btcec" + "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/btcsuite/btcd/txscript" + "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcutil" + "github.com/btcsuite/btcwallet/waddrmgr" "github.com/coreos/bbolt" "github.com/davecgh/go-spew/spew" "github.com/lightningnetwork/lnd/channeldb" @@ -28,13 +35,6 @@ import ( "github.com/lightningnetwork/lnd/routing" "github.com/lightningnetwork/lnd/signal" "github.com/lightningnetwork/lnd/zpay32" - "github.com/btcsuite/btcd/blockchain" - "github.com/btcsuite/btcd/btcec" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" - "github.com/btcsuite/btcwallet/waddrmgr" "github.com/tv42/zbase32" "golang.org/x/net/context" ) @@ -2450,7 +2450,7 @@ func (r *rpcServer) AddInvoice(ctx context.Context, return nil, fmt.Errorf("payments of negative value "+ "are not allowed, value is %v", invoice.Value) } - + amt := btcutil.Amount(invoice.Value) amtMSat := lnwire.NewMSatFromSatoshis(amt) diff --git a/shachain/store.go b/shachain/store.go index 8834870a..252abdfe 100644 --- a/shachain/store.go +++ b/shachain/store.go @@ -4,8 +4,8 @@ import ( "encoding/binary" "io" - "github.com/go-errors/errors" "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/go-errors/errors" ) // Store is an interface which serves as an abstraction over data structure diff --git a/utxonursery_test.go b/utxonursery_test.go index d4faa824..adff6d3e 100644 --- a/utxonursery_test.go +++ b/utxonursery_test.go @@ -8,12 +8,12 @@ import ( "reflect" "testing" - "github.com/lightningnetwork/lnd/lnwallet" "github.com/btcsuite/btcd/btcec" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcutil" + "github.com/lightningnetwork/lnd/lnwallet" ) var ( diff --git a/walletunlocker/service.go b/walletunlocker/service.go index 35f7acf1..5ab9f068 100644 --- a/walletunlocker/service.go +++ b/walletunlocker/service.go @@ -7,14 +7,14 @@ import ( "os" "time" + "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcwallet/wallet" "github.com/lightningnetwork/lnd/aezeed" + "github.com/lightningnetwork/lnd/keychain" "github.com/lightningnetwork/lnd/lnrpc" "github.com/lightningnetwork/lnd/lnwallet" "github.com/lightningnetwork/lnd/lnwallet/btcwallet" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcwallet/wallet" "golang.org/x/net/context" - "github.com/lightningnetwork/lnd/keychain" ) // WalletInitMsg is a message sent by the UnlockerService when a user wishes to diff --git a/walletunlocker/service_test.go b/walletunlocker/service_test.go index 7c9b5e58..330ab7ab 100644 --- a/walletunlocker/service_test.go +++ b/walletunlocker/service_test.go @@ -8,14 +8,14 @@ import ( "testing" "time" + "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcwallet/wallet" "github.com/lightningnetwork/lnd/aezeed" + "github.com/lightningnetwork/lnd/keychain" "github.com/lightningnetwork/lnd/lnrpc" "github.com/lightningnetwork/lnd/lnwallet/btcwallet" "github.com/lightningnetwork/lnd/walletunlocker" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcwallet/wallet" "golang.org/x/net/context" - "github.com/lightningnetwork/lnd/keychain" ) const ( diff --git a/witness_beacon.go b/witness_beacon.go index f1ab90f7..a3b90bc6 100644 --- a/witness_beacon.go +++ b/witness_beacon.go @@ -3,10 +3,10 @@ package main import ( "sync" + "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/lightningnetwork/lnd/channeldb" "github.com/lightningnetwork/lnd/contractcourt" "github.com/lightningnetwork/lnd/lnwallet" - "github.com/btcsuite/btcd/chaincfg/chainhash" ) // preimageSubscriber reprints an active subscription to be notified once the diff --git a/zpay32/invoice.go b/zpay32/invoice.go index 8ad843b8..66ce3244 100644 --- a/zpay32/invoice.go +++ b/zpay32/invoice.go @@ -7,13 +7,13 @@ import ( "strings" "time" - "github.com/lightningnetwork/lnd/lnwire" - "github.com/lightningnetwork/lnd/routing" "github.com/btcsuite/btcd/btcec" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcutil" "github.com/btcsuite/btcutil/bech32" + "github.com/lightningnetwork/lnd/lnwire" + "github.com/lightningnetwork/lnd/routing" ) const ( diff --git a/zpay32/invoice_internal_test.go b/zpay32/invoice_internal_test.go index 3eed2a88..1311a46f 100644 --- a/zpay32/invoice_internal_test.go +++ b/zpay32/invoice_internal_test.go @@ -7,12 +7,12 @@ import ( "testing" "time" - "github.com/lightningnetwork/lnd/lnwire" - "github.com/lightningnetwork/lnd/routing" "github.com/btcsuite/btcd/btcec" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcutil" "github.com/btcsuite/btcutil/bech32" + "github.com/lightningnetwork/lnd/lnwire" + "github.com/lightningnetwork/lnd/routing" ) // TestDecodeAmount ensures that the amount string in the hrp of the Invoice diff --git a/zpay32/invoice_test.go b/zpay32/invoice_test.go index 51fa72c9..7b54e933 100644 --- a/zpay32/invoice_test.go +++ b/zpay32/invoice_test.go @@ -11,13 +11,13 @@ import ( "testing" "time" - "github.com/lightningnetwork/lnd/lnwire" - "github.com/lightningnetwork/lnd/routing" "github.com/btcsuite/btcd/btcec" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcutil" + "github.com/lightningnetwork/lnd/lnwire" + "github.com/lightningnetwork/lnd/routing" litecoinCfg "github.com/ltcsuite/ltcd/chaincfg" )