mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
lightningd: have makesecret take hex or string (just like datastore)
Changelog-Added: JSON-RPC: `makesecret` can take a string argument instead of hex. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -2281,6 +2281,10 @@ def test_makesecret(node_factory):
|
||||
assert l1.rpc.makesecret(hex="736362207365637265")["secret"] != secret
|
||||
assert l1.rpc.makesecret(hex="7363622073656372657401")["secret"] != secret
|
||||
|
||||
# Using string works!
|
||||
assert l1.rpc.makesecret(string="scb secret")["secret"] == secret
|
||||
assert l1.rpc.makesecret(None, "scb secret")["secret"] == secret
|
||||
|
||||
|
||||
def test_staticbackup(node_factory):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user