From b01947b7dce2dfcfd71f913315098651156a0d53 Mon Sep 17 00:00:00 2001 From: yyforyongyu Date: Wed, 8 Jul 2020 16:30:09 +0800 Subject: [PATCH] lnd: fix go fmt --- cert/selfsigned.go | 2 +- channeldb/kvdb/etcd/stm.go | 2 +- lntest/itest/lnd_forward_interceptor_test.go | 8 ++++---- pilot.go | 20 ++++++++++---------- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/cert/selfsigned.go b/cert/selfsigned.go index 244d64b7..bcb7cb9c 100644 --- a/cert/selfsigned.go +++ b/cert/selfsigned.go @@ -228,7 +228,7 @@ func GenCertPair(org, certFile, keyFile string, tlsExtraIPs, KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign, - ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth}, + ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth}, IsCA: true, // so can sign self. BasicConstraintsValid: true, diff --git a/channeldb/kvdb/etcd/stm.go b/channeldb/kvdb/etcd/stm.go index bf769d11..7a2f33b5 100644 --- a/channeldb/kvdb/etcd/stm.go +++ b/channeldb/kvdb/etcd/stm.go @@ -307,7 +307,7 @@ func (rs readSet) gets() []v3.Op { func (rs readSet) cmps(lset map[string]interface{}) []v3.Cmp { if len(lset) > 0 { cmps := make([]v3.Cmp, 0, len(lset)) - for key, _ := range lset { + for key := range lset { if getValue, ok := rs[key]; ok { cmps = append( cmps, diff --git a/lntest/itest/lnd_forward_interceptor_test.go b/lntest/itest/lnd_forward_interceptor_test.go index 95b49dae..0a72d477 100644 --- a/lntest/itest/lnd_forward_interceptor_test.go +++ b/lntest/itest/lnd_forward_interceptor_test.go @@ -272,13 +272,13 @@ func (c *interceptorTestContext) prepareTestCases() ( []*interceptorTestCase, error) { cases := []*interceptorTestCase{ - &interceptorTestCase{amountMsat: 1000, shouldHold: false, + {amountMsat: 1000, shouldHold: false, interceptorAction: routerrpc.ResolveHoldForwardAction_FAIL}, - &interceptorTestCase{amountMsat: 1000, shouldHold: false, + {amountMsat: 1000, shouldHold: false, interceptorAction: routerrpc.ResolveHoldForwardAction_RESUME}, - &interceptorTestCase{amountMsat: 1000, shouldHold: false, + {amountMsat: 1000, shouldHold: false, interceptorAction: routerrpc.ResolveHoldForwardAction_SETTLE}, - &interceptorTestCase{amountMsat: 1000, shouldHold: true, + {amountMsat: 1000, shouldHold: true, interceptorAction: routerrpc.ResolveHoldForwardAction_RESUME}, } diff --git a/pilot.go b/pilot.go index 76303941..9ce83906 100644 --- a/pilot.go +++ b/pilot.go @@ -96,16 +96,16 @@ func (c *chanController) OpenChannel(target *btcec.PublicKey, // Construct the open channel request and send it to the server to begin // the funding workflow. req := &openChanReq{ - targetPubkey: target, - chainHash: *activeNetParams.GenesisHash, - subtractFees: true, - localFundingAmt: amt, - pushAmt: 0, - minHtlcIn: c.chanMinHtlcIn, - fundingFeePerKw: feePerKw, - private: c.private, - remoteCsvDelay: 0, - minConfs: c.minConfs, + targetPubkey: target, + chainHash: *activeNetParams.GenesisHash, + subtractFees: true, + localFundingAmt: amt, + pushAmt: 0, + minHtlcIn: c.chanMinHtlcIn, + fundingFeePerKw: feePerKw, + private: c.private, + remoteCsvDelay: 0, + minConfs: c.minConfs, maxValueInFlight: 0, }