lightningd: fix type of listhtlcs payment_hash.

`hash` is a tighter requirement than simply `hex`.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2023-01-30 16:38:03 +10:30 committed by Alex Myers
parent 9ab488fc41
commit d6f46e2373
2 changed files with 4 additions and 6 deletions

View file

@ -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)
@ -46,4 +46,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:2f658fb394c49408c60c03b396bbc5afe7465fd33f48d8043233f2fe2b76f25e)
[comment]: # ( SHA256STAMP:990e36b109c9e318bc566a951ce0d39032e252cdd1555c75ad7b168d547c937f)

View file

@ -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",