Skip to content

Commit 25b02d4

Browse files
authored
Merge pull request #157 from lightninglabs/lnd-16
multi: bump lnd+lndclient compile time dependency
2 parents 3933a2c + 220e931 commit 25b02d4

File tree

14 files changed

+431
-503
lines changed

14 files changed

+431
-503
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ env:
2121
# /Dockerfile
2222
# /frdrpc/Dockerfile
2323
# /itest/Dockerfile
24-
GO_VERSION: 1.18.8
24+
GO_VERSION: 1.19.4
2525

2626
jobs:
2727
########################

accounting/filter.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"time"
77

88
"github.com/lightninglabs/lndclient"
9-
"github.com/lightningnetwork/lnd/channeldb"
9+
invoicespkg "github.com/lightningnetwork/lnd/invoices"
1010
"github.com/lightningnetwork/lnd/lnrpc"
1111
"github.com/lightningnetwork/lnd/routing/route"
1212
)
@@ -95,7 +95,7 @@ func filterInvoices(startTime, endTime time.Time,
9595
for _, invoice := range invoices {
9696
// If the invoice was not settled, we do not need to create an
9797
// entry for it.
98-
if invoice.State != channeldb.ContractSettled {
98+
if invoice.State != invoicespkg.ContractSettled {
9999
continue
100100
}
101101

accounting/filter_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"time"
66

77
"github.com/lightninglabs/lndclient"
8-
"github.com/lightningnetwork/lnd/channeldb"
8+
invoicespkg "github.com/lightningnetwork/lnd/invoices"
99
"github.com/lightningnetwork/lnd/lnrpc"
1010
"github.com/lightningnetwork/lnd/routing/route"
1111
"github.com/stretchr/testify/require"
@@ -143,18 +143,18 @@ func TestFilterInvoices(t *testing.T) {
143143
// time range that is settled.
144144
settledInvoice := lndclient.Invoice{
145145
SettleDate: inRange,
146-
State: channeldb.ContractSettled,
146+
State: invoicespkg.ContractSettled,
147147
}
148148

149149
invoices := []lndclient.Invoice{
150150
settledInvoice,
151151
{
152152
SettleDate: inRange,
153-
State: channeldb.ContractCanceled,
153+
State: invoicespkg.ContractCanceled,
154154
},
155155
{
156156
SettleDate: time.Unix(startTime-1, 0),
157-
State: channeldb.ContractSettled,
157+
State: invoicespkg.ContractSettled,
158158
},
159159
}
160160

config.go

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -360,15 +360,24 @@ func loadCertWithCreate(cfg *Config) (tls.Certificate, *x509.Certificate,
360360
!lnrpc.FileExists(cfg.TLSKeyPath) {
361361

362362
log.Infof("Generating TLS certificates...")
363-
err := cert.GenCertPair(
364-
defaultSelfSignedOrganization, cfg.TLSCertPath,
365-
cfg.TLSKeyPath, cfg.TLSExtraIPs,
363+
certBytes, keyBytes, err := cert.GenCertPair(
364+
defaultSelfSignedOrganization, cfg.TLSExtraIPs,
366365
cfg.TLSExtraDomains, cfg.TLSDisableAutofill,
367366
DefaultAutogenValidity,
368367
)
369368
if err != nil {
370369
return tls.Certificate{}, nil, err
371370
}
371+
372+
// Now that we have the certificate and key, we'll store them
373+
// to the file system.
374+
err = cert.WriteCertPair(
375+
cfg.TLSCertPath, cfg.TLSKeyPath, certBytes, keyBytes,
376+
)
377+
if err != nil {
378+
return tls.Certificate{}, nil, err
379+
}
380+
372381
log.Infof("Done generating TLS certificates")
373382
}
374383

dataset/dataset.go

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,20 +156,26 @@ func (d Dataset) isIQROutlier(value, lowerQuartile, upperQuartile,
156156
// Given some random set of data, with lower quartile = 5 and upper quartile
157157
// = 6, the inter-quartile range is 1.
158158
//
159-
// LQ UQ
160-
// [ 1 2 5 5 5 6 6 6 8 11 ]
159+
// LQ UQ
160+
// [ 1 2 5 5 5 6 6 6 8 11 ]
161161
//
162162
// For larger values, eg multiplier=3, we will detect fewer outliers:
163163
// Lower outlier bound: 5 - (1 * 3) = 2
164-
// -> 1 is a strong lower outlier
164+
//
165+
// -> 1 is a strong lower outlier
166+
//
165167
// Upper outlier bound: 6 + (1 * 3) = 9
166-
// -> 11 is a strong upper outlier
168+
//
169+
// -> 11 is a strong upper outlier
167170
//
168171
// For smaller values, eg multiplier=1.5, we detect more outliers:
169172
// Weak lower outlier bound: 5 - (1 * 1.5) = 3.5
170-
// -> 1 and 2 are weak lower outliers
173+
//
174+
// -> 1 and 2 are weak lower outliers
175+
//
171176
// Weak upper outlier bound: 6 + (1 *1.5) = 7.5
172-
// -> 8 and 11 are weak upper outliers
177+
//
178+
// -> 8 and 11 are weak upper outliers
173179
func (d Dataset) GetOutliers(outlierMultiplier float64) (
174180
map[string]*OutlierResult, error) {
175181

frdrpc/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.18.8-buster
1+
FROM golang:1.19.4-buster
22

33
RUN apt-get update && apt-get install -y \
44
git \

0 commit comments

Comments
 (0)