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

@ -228,7 +228,7 @@ func GenCertPair(org, certFile, keyFile string, tlsExtraIPs,
KeyUsage: x509.KeyUsageKeyEncipherment | KeyUsage: x509.KeyUsageKeyEncipherment |
x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign, x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign,
ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth}, ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth},
IsCA: true, // so can sign self. IsCA: true, // so can sign self.
BasicConstraintsValid: true, BasicConstraintsValid: true,

@ -307,7 +307,7 @@ func (rs readSet) gets() []v3.Op {
func (rs readSet) cmps(lset map[string]interface{}) []v3.Cmp { func (rs readSet) cmps(lset map[string]interface{}) []v3.Cmp {
if len(lset) > 0 { if len(lset) > 0 {
cmps := make([]v3.Cmp, 0, len(lset)) cmps := make([]v3.Cmp, 0, len(lset))
for key, _ := range lset { for key := range lset {
if getValue, ok := rs[key]; ok { if getValue, ok := rs[key]; ok {
cmps = append( cmps = append(
cmps, cmps,

@ -272,13 +272,13 @@ func (c *interceptorTestContext) prepareTestCases() (
[]*interceptorTestCase, error) { []*interceptorTestCase, error) {
cases := []*interceptorTestCase{ cases := []*interceptorTestCase{
&interceptorTestCase{amountMsat: 1000, shouldHold: false, {amountMsat: 1000, shouldHold: false,
interceptorAction: routerrpc.ResolveHoldForwardAction_FAIL}, interceptorAction: routerrpc.ResolveHoldForwardAction_FAIL},
&interceptorTestCase{amountMsat: 1000, shouldHold: false, {amountMsat: 1000, shouldHold: false,
interceptorAction: routerrpc.ResolveHoldForwardAction_RESUME}, interceptorAction: routerrpc.ResolveHoldForwardAction_RESUME},
&interceptorTestCase{amountMsat: 1000, shouldHold: false, {amountMsat: 1000, shouldHold: false,
interceptorAction: routerrpc.ResolveHoldForwardAction_SETTLE}, interceptorAction: routerrpc.ResolveHoldForwardAction_SETTLE},
&interceptorTestCase{amountMsat: 1000, shouldHold: true, {amountMsat: 1000, shouldHold: true,
interceptorAction: routerrpc.ResolveHoldForwardAction_RESUME}, interceptorAction: routerrpc.ResolveHoldForwardAction_RESUME},
} }

@ -96,16 +96,16 @@ func (c *chanController) OpenChannel(target *btcec.PublicKey,
// Construct the open channel request and send it to the server to begin // Construct the open channel request and send it to the server to begin
// the funding workflow. // the funding workflow.
req := &openChanReq{ req := &openChanReq{
targetPubkey: target, targetPubkey: target,
chainHash: *activeNetParams.GenesisHash, chainHash: *activeNetParams.GenesisHash,
subtractFees: true, subtractFees: true,
localFundingAmt: amt, localFundingAmt: amt,
pushAmt: 0, pushAmt: 0,
minHtlcIn: c.chanMinHtlcIn, minHtlcIn: c.chanMinHtlcIn,
fundingFeePerKw: feePerKw, fundingFeePerKw: feePerKw,
private: c.private, private: c.private,
remoteCsvDelay: 0, remoteCsvDelay: 0,
minConfs: c.minConfs, minConfs: c.minConfs,
maxValueInFlight: 0, maxValueInFlight: 0,
} }