-
Notifications
You must be signed in to change notification settings - Fork 968
lightningd: add description field to offer related responces #8782
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
lightningd: add description field to offer related responces #8782
Conversation
c67d35a to
60073f9
Compare
d13eef1 to
053694a
Compare
ShahanaFarooqui
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rustyrussell Currently, listsendpays and sql -k query="SELECT * FROM sendpays;" do not return the Bolt11/Bolt12 description. In contrast, listinvoices and sql -k query="SELECT * FROM invoices;", and listoffers and sql -k query="SELECT * FROM offers;" (after this PR), will also show the description. Should we extend the same functionality to sendpays as well? If so, I will create a separate issue for that and keep this PR focused on offers only.
Changelog-Added: Expose decoded offer description in `offer` and `listoffers` RPC responses.
Changelog-Added: Add `description` field to expected schemas
f3a2437 to
96960f2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@erdoganishe Thanks for the updates. The PR is nearly ready to merge. As this is your first PR, I am being a bit more nit-picky than usual to draw your attention to commit practices 🙂:
nit: Git log entries with Changelog-* tags generate the release changelog from PRs merged between releases. While multiple changelog entries per PR are fine, they should represent independent changes. For instance, if one commit adds a field and another removes an RPC, separate entries make sense. However, this PR makes a single logical change from a release perspective: adding a description field across multiple RPCs.
So rather than having multiple entries, we can include a single changelog entry in any one commit, like: "Changelog-Added: Add description field to listoffers, encodeoffer, decodeoffer, and the sql plugin’s offers table."
nit: We already have a commit titled doc: Added doc schemas with description and update proto that updates the protobufs. Could we either merge the changes from the later commit (grpc: regenerate Python protobufs after rebase) into that commit, or split the original commit into two logical ones like: doc: Added doc schemas with description and grpc: Update protobufs with description field.
nit: I initially added my changes into a separate commit (lightningd: Updated offer methods) to make the changes clearer for your review. However, this commit isn’t meaningful for future references and should be merged with lightningd: add description field to offer related responces.
Fixes #8554.
Add description field for offer related responces. Examples:
% lightning-cli --network=regtest --lightning-dir=/tmp/cln1 listoffers { "offers": [ { "offer_id": "41ebdcd9d7b72e7b6e4294ab6fec93c8e99c4fe1df7b3503386b64aeefc233f0", "active": true, "single_use": false, "bolt12": "lno1qgsqvgnwgcg35z6ee2h3yczraddm72xrfua9uve2rlrm9deu7xyfzrcgq9jq5rjrdanxvet9ypcxz7tdv4h8gysqzcss8zeszk6dq87kufv7nswc9l22kfsy3x9ckuxavvle8q27gf5k2j8u", "description": "Coffee payment", "used": false, "label": "myoffer" } ] }