Skip to content

rpc: expose invoice features in decodepayreq#3802

Merged
Roasbeef merged 5 commits intolightningnetwork:masterfrom
cfromknecht:rpc-invoice-features
Dec 10, 2019
Merged

rpc: expose invoice features in decodepayreq#3802
Roasbeef merged 5 commits intolightningnetwork:masterfrom
cfromknecht:rpc-invoice-features

Conversation

@cfromknecht
Copy link
Contributor

@cfromknecht cfromknecht commented Dec 5, 2019

Split off from #3679

Now that all invoices have been migrated to have features vectors (#3693),
we can expose this info via the rpc interface. Invoices generated prior to
this commit will show an empty list, but new invoices will set
lnwire.TLVOnionPayloadOptional as configured in the default
feature.Manager.

Note that for now this feature bit will be ignored by the router, but this will
change once #3679 is finalized.

@cfromknecht cfromknecht added this to the 0.9.0 milestone Dec 5, 2019
@cfromknecht cfromknecht added amp rpc Related to the RPC interface spec payments Related to invoices/payments labels Dec 5, 2019
@cfromknecht cfromknecht force-pushed the rpc-invoice-features branch 2 times, most recently from 7ffcf3f to 565c01f Compare December 6, 2019 01:02
Copy link
Contributor

@halseth halseth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice PR, LGTM 👍

Copy link
Member

@Roasbeef Roasbeef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Straightforward preparatory PR, only a few minor comments.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the commit message: featire -> feature.

Perhaps we should leave displaying the bit for unknown features?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the bit is exposed separately in the rpc, wouldn't it be redundant?

@Roasbeef
Copy link
Member

Needs rebase (just protos).

@cfromknecht
Copy link
Contributor Author

@Roasbeef rebased

Originally the feature namespaces were destined to be split, but this
has changed with the introduction of flat features.
The number and the name will be separate on the rpc level, so we remove
the feature bit from the string. Currently this method is unused apart
from maybe in some rare logging instances.
@Roasbeef Roasbeef merged commit a68144b into lightningnetwork:master Dec 10, 2019
@cfromknecht cfromknecht deleted the rpc-invoice-features branch December 10, 2019 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

amp payments Related to invoices/payments rpc Related to the RPC interface spec

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants