Skip to content

Commit

Permalink
lightningd: fix type of listhtlcs payment_hash.
Browse files Browse the repository at this point in the history
`hash` is a tighter requirement than simply `hex`.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
rustyrussell authored and endothermicdev committed Jan 30, 2023
1 parent 9ab488f commit d6f46e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions doc/lightning-listhtlcs.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ On success, an object containing **htlcs** is returned. It is an array of objec
- **expiry** (u32): the block number where this HTLC expires/expired
- **amount\_msat** (msat): the value of the HTLC
- **direction** (string): out if we offered this to the peer, in if they offered it (one of "out", "in")
- **payment\_hash** (hex): payment hash sought by HTLC (always 64 characters)
- **payment\_hash** (hash): payment hash sought by HTLC
- **state** (string): The first 10 states are for `in`, the next 10 are for `out`. (one of "SENT\_ADD\_HTLC", "SENT\_ADD\_COMMIT", "RCVD\_ADD\_REVOCATION", "RCVD\_ADD\_ACK\_COMMIT", "SENT\_ADD\_ACK\_REVOCATION", "RCVD\_REMOVE\_HTLC", "RCVD\_REMOVE\_COMMIT", "SENT\_REMOVE\_REVOCATION", "SENT\_REMOVE\_ACK\_COMMIT", "RCVD\_REMOVE\_ACK\_REVOCATION", "RCVD\_ADD\_HTLC", "RCVD\_ADD\_COMMIT", "SENT\_ADD\_REVOCATION", "SENT\_ADD\_ACK\_COMMIT", "RCVD\_ADD\_ACK\_REVOCATION", "SENT\_REMOVE\_HTLC", "SENT\_REMOVE\_COMMIT", "RCVD\_REMOVE\_REVOCATION", "RCVD\_REMOVE\_ACK\_COMMIT", "SENT\_REMOVE\_ACK\_REVOCATION")

[comment]: # (GENERATE-FROM-SCHEMA-END)
Expand All @@ -46,4 +46,4 @@ RESOURCES

Main web site: <https://github.com/ElementsProject/lightning>

[comment]: # ( SHA256STAMP:2f658fb394c49408c60c03b396bbc5afe7465fd33f48d8043233f2fe2b76f25e)
[comment]: # ( SHA256STAMP:990e36b109c9e318bc566a951ce0d39032e252cdd1555c75ad7b168d547c937f)
6 changes: 2 additions & 4 deletions doc/schemas/listhtlcs.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,8 @@
"description": "out if we offered this to the peer, in if they offered it"
},
"payment_hash": {
"type": "hex",
"description": "payment hash sought by HTLC",
"maxLength": 64,
"minLength": 64
"type": "hash",
"description": "payment hash sought by HTLC"
},
"state": {
"type": "string",
Expand Down

0 comments on commit d6f46e2

Please sign in to comment.