commando: changed listrunes schema for `restrictions` `english` key

Changelog: None
This commit is contained in:
Shahana Farooqui 2023-07-14 22:49:41 -07:00 committed by Rusty Russell
parent 0bcff1e76d
commit a4835cf266
3 changed files with 9 additions and 5 deletions

View File

@ -27,6 +27,7 @@ On success, an object containing **runes** is returned. It is an array of objec
- **value** (string): The value accepted for this field
- **condition** (string): The way to compare fieldname and value
- **english** (string): English readable description of this alternative
- **english** (string): English readable summary of alternatives above
- **restrictions\_as\_english** (string): English readable description of the restrictions array above
- **stored** (boolean, optional): This is false if the rune does not appear in our datastore (only possible when `rune` is specified) (always *false*)
- **blacklisted** (boolean, optional): The rune has been blacklisted; see commando-blacklist(7) (always *true*)
@ -49,4 +50,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:e117496020fda2d3c5eee7f9df8516d40f315b387f4cd18c1483640a2cd9f73b)
[comment]: # ( SHA256STAMP:cd0e75bbeef3d5824448f67485de4679b0c163e97f405673b2ba9495f970d498)

View File

@ -66,11 +66,11 @@
"description": "English readable description of this alternative"
}
}
},
"english": {
"type": "string",
"description": "English readable summary of alternatives above"
}
},
"english": {
"type": "string",
"description": "English readable summary of alternatives above"
}
}
}

View File

@ -3020,6 +3020,9 @@ def test_commando_listrunes(node_factory):
our_unstored_rune = l1.rpc.commando_listrunes(rune='M8f4jNx9gSP2QoiRbr10ybwzFxUgd-rS4CR4yofMSuA9Mg==')['runes'][0]
assert our_unstored_rune['stored'] is False
our_unstored_rune = l1.rpc.commando_listrunes(rune='m_tyR0qqHUuLEbFJW6AhmBg-9npxVX2yKocQBFi9cvY9MyZpZF4wMjJkMjIzNjIwYTM1OWE0N2ZmNyZtZXRob2Q9bGlzdHBlZXJzJnBuYW1lbGV2ZWwhfHBuYW1lbGV2ZWwvaW8mcGFycjEhfHBhcnIxL2lv')['runes'][0]
assert our_unstored_rune['stored'] is False
not_our_rune = l1.rpc.commando_listrunes(rune='Am3W_wI0PRn4qVNEsJ2iInHyFPQK8wfdqEXztm8-icQ9MA==')['runes'][0]
assert not_our_rune['stored'] is False
assert not_our_rune['our_rune'] is False