lnd: fix go fmt

This commit is contained in:
yyforyongyu 2020-07-08 16:30:09 +08:00
parent 60446494e9
commit b01947b7dc
4 changed files with 16 additions and 16 deletions

View File

@ -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,

View File

@ -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,

View File

@ -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},
}

View File

@ -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,
}