Skip to content

Commit 7add5bf

Browse files
committed
tlv+go.mod: generate inbound fee TLV type
Also add a temporariy replace to the tlv package which can be removed as soon as the PR that includes this commit is merged and a new tag for the tlv package has been created.
1 parent bf72d9e commit 7add5bf

File tree

4 files changed

+18
-2
lines changed

4 files changed

+18
-2
lines changed

go.mod

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,9 @@ require (
203203
// store have been included in a tagged sqldb version.
204204
replace github.com/lightningnetwork/lnd/sqldb => ./sqldb
205205

206+
// TODO(elle): replace once the updated tlv package has been tagged.
207+
replace github.com/lightningnetwork/lnd/tlv => ./tlv
208+
206209
// This replace is for https://github.com/advisories/GHSA-25xm-hr59-7c27
207210
replace github.com/ulikunitz/xz => github.com/ulikunitz/xz v0.5.11
208211

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,8 +377,6 @@ github.com/lightningnetwork/lnd/queue v1.1.1 h1:99ovBlpM9B0FRCGYJo6RSFDlt8/vOkQQ
377377
github.com/lightningnetwork/lnd/queue v1.1.1/go.mod h1:7A6nC1Qrm32FHuhx/mi1cieAiBZo5O6l8IBIoQxvkz4=
378378
github.com/lightningnetwork/lnd/ticker v1.1.1 h1:J/b6N2hibFtC7JLV77ULQp++QLtCwT6ijJlbdiZFbSM=
379379
github.com/lightningnetwork/lnd/ticker v1.1.1/go.mod h1:waPTRAAcwtu7Ji3+3k+u/xH5GHovTsCoSVpho0KDvdA=
380-
github.com/lightningnetwork/lnd/tlv v1.3.1 h1:o7CZg06y+rJZfUMAo0WzBLr0pgBWCzrt0f9gpujYUzk=
381-
github.com/lightningnetwork/lnd/tlv v1.3.1/go.mod h1:pJuiBj1ecr1WWLOtcZ+2+hu9Ey25aJWFIsjmAoPPnmc=
382380
github.com/lightningnetwork/lnd/tor v1.1.6 h1:WHUumk7WgU6BUFsqHuqszI9P6nfhMeIG+rjJBlVE6OE=
383381
github.com/lightningnetwork/lnd/tor v1.1.6/go.mod h1:qSRB8llhAK+a6kaTPWOLLXSZc6Hg8ZC0mq1sUQ/8JfI=
384382
github.com/ltcsuite/ltcd v0.0.0-20190101042124-f37f8bf35796 h1:sjOGyegMIhvgfq5oaue6Td+hxZuf3tDC8lAPrFldqFw=

tlv/internal/gen/gen_tlv_types.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,18 @@ const (
2222
// second defined unsigned TLV range used in pure TLV messages.
2323
pureTLVSecondUnsignedTypeRangeStart uint32 = 3000000000
2424

25+
// inboundFeeType defines the TLV type used within the channel_update
26+
// message to indicate the inbound fee for a channel.
27+
inboundFeeType = 55555
28+
2529
defaultOutputFile = "tlv_types_generated.go"
2630
)
2731

2832
// typeMarkers defines any adhoc TLV types we want to generate.
2933
var typeMarkers = map[uint32]struct{}{
3034
pureTLVSecondSignedTypeRangeStart: {},
3135
pureTLVSecondUnsignedTypeRangeStart: {},
36+
inboundFeeType: {},
3237
}
3338

3439
const typeCodeTemplate = `// Code generated by tlv/internal/gen; DO NOT EDIT.

tlv/tlv_types_generated.go

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)