Skip to content
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

cln-rpc & cln-grpc: Backfill more methods #5104

Merged
merged 35 commits into from
Apr 1, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
a09031a
msggen: Wrap field numberings in the message type
cdecker Apr 1, 2022
dd9a7f5
cln-grpc: Add the `connect` method
cdecker Apr 1, 2022
b696e99
cln-rpc: Add invoice RPC methods
cdecker Apr 1, 2022
fa76898
msggen: Add custom mappings for JSON -> grpc conversions
cdecker Apr 1, 2022
7542169
grpc: Map `sendonion` and `createonion`
cdecker Apr 1, 2022
6940b2f
cln-rpc: Map feerates and backfill methods using it
cdecker Apr 1, 2022
a946961
cln-rpc: Add `OutputDesc` for `{addr: amt}` style arguments
cdecker Apr 1, 2022
5c3caaf
cln-rpc: Map PSBT and TX methods
cdecker Apr 1, 2022
242f1aa
cln-grpc: Map AmountOrAll and AmountOrAny
cdecker Apr 1, 2022
9947eed
pytest: fix if no rust installed.
rustyrussell Apr 1, 2022
a8bfac0
fundpsbt: deprecate reserve=true/false usage.
rustyrussell Apr 1, 2022
7ff80ad
lightningd: deprecate invoice expiry suffixes.
rustyrussell Apr 1, 2022
9fbe2dd
doc: set additionalProperties to false in all request schemas.
rustyrussell Apr 1, 2022
25eb1ac
pyln-testing: add dev-pay.
rustyrussell Apr 1, 2022
485e5e9
pyln-testing: add dev-invoice.
rustyrussell Apr 1, 2022
c59ddbf
pytest: don't hand a string for an integer value.
rustyrussell Apr 1, 2022
56fd6dd
pyln-testing: add new schema types.
rustyrussell Apr 1, 2022
0de7343
doc/schemas: fixes for request schemas.
rustyrussell Apr 1, 2022
6ede1e9
pyln-testing: check the request schemas.
rustyrussell Apr 1, 2022
c433749
msggen: Add parser for "oneOf"
cdecker Apr 1, 2022
fba30a9
msggen: Add model-side overrides
cdecker Apr 1, 2022
d2f0785
msggen: Add RoutehintList as a primitive
cdecker Apr 1, 2022
854f108
cln-rpc: Make Pubkey and ShortChannelId proper types
cdecker Apr 1, 2022
bcbde01
cln-rpc: Move tests into separate file
cdecker Apr 1, 2022
345ea33
cln-rpc: The JSON `number` type is a float not an int
cdecker Apr 1, 2022
a296975
cln-rpc: Skip the HTLC state for now
cdecker Apr 1, 2022
c9949e6
cln-rpc: Log requests and responses
cdecker Apr 1, 2022
262336e
cln-rpc: Add Sha256 and Secret types
cdecker Apr 1, 2022
8c9572a
doc: Annotate secrets and hashes in the JSON Schemas
cdecker Apr 1, 2022
438339e
cln-rpc: Test that we forward errors correctly
cdecker Apr 1, 2022
eff94e3
cln-grpc: Add conversion test for listpeers
cdecker Apr 1, 2022
7c990bf
cln-rpc: Yet more RPC methods being mapped
cdecker Apr 1, 2022
306de2b
pytest: fix RUST=0 pytest.
rustyrussell Apr 1, 2022
baa51ad
msggen: Don't assume we have properties in the schema
cdecker Apr 1, 2022
9a76d84
cln-grpc: Final generation of derived files
cdecker Apr 1, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
pytest: don't hand a string for an integer value.
lightningd is happy, but our schema won't be.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
rustyrussell committed Apr 1, 2022
commit c59ddbf6ce4240e158ac48f2b4f7c5e30a0203a2
2 changes: 1 addition & 1 deletion tests/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def test_connection_moved(node_factory, executor):
log = l1.daemon.wait_for_log('listening for connections')
match = re.search(r'on port (\d*)', log)
assert match and len(match.groups()) == 1
hang_port = match.groups()[0]
hang_port = int(match.groups()[0])

# Attempt connection
fut_hang = executor.submit(l1.rpc.connect, l2.info['id'],
Expand Down
4 changes: 2 additions & 2 deletions tests/test_invoices.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def test_invoice(node_factory, chainparams):
addr1 = l2.rpc.newaddr('bech32')['bech32']
addr2 = l2.rpc.newaddr('p2sh-segwit')['p2sh-segwit']
before = int(time.time())
inv = l1.rpc.invoice(123000, 'label', 'description', '3700', [addr1, addr2])
inv = l1.rpc.invoice(123000, 'label', 'description', 3700, [addr1, addr2])
after = int(time.time())
b11 = l1.rpc.decodepay(inv['bolt11'])
assert b11['currency'] == chainparams['bip173_prefix']
Expand Down Expand Up @@ -55,7 +55,7 @@ def test_invoice(node_factory, chainparams):
assert 'warning_capacity' in inv

# Test cltv option.
inv = l1.rpc.invoice(123000, 'label3', 'description', '3700', cltv=99)
inv = l1.rpc.invoice(123000, 'label3', 'description', 3700, cltv=99)
b11 = l1.rpc.decodepay(inv['bolt11'])
assert b11['min_final_cltv_expiry'] == 99

Expand Down
6 changes: 3 additions & 3 deletions tests/test_pay.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ def test_pay_optional_args(node_factory, compat):
# root of a payment tree with the bolt11 invoice).

anyinv = l2.rpc.invoice('any', 'any_pay', 'desc')['bolt11']
l1.dev_pay(anyinv, label='desc', msatoshi='500', use_shadow=False)
l1.dev_pay(anyinv, label='desc', msatoshi=500, use_shadow=False)
payment3 = l1.rpc.listsendpays(anyinv)['payments']
assert len(payment3) == 1
assert payment3[0]['label'] == 'desc'
Expand Down Expand Up @@ -539,7 +539,7 @@ def test_pay_maxfee_shadow(node_factory):
# maxfeepercent.
amount = 20000
bolt11 = l2.rpc.invoice(amount, "big.{}".format(i), "bigger")["bolt11"]
pay_status = l1.rpc.pay(bolt11, maxfeepercent="0.000001")
pay_status = l1.rpc.pay(bolt11, maxfeepercent=0.001)
assert pay_status["amount_msat"] == Millisatoshi(amount)


Expand Down Expand Up @@ -5220,7 +5220,7 @@ def test_pay_manual_exclude(node_factory, bitcoind):
chan23 = l2.rpc.listpeers(l3_id)['peers'][0]['channels'][0]
scid12 = chan12['short_channel_id'] + '/' + str(chan12['direction'])
scid23 = chan23['short_channel_id'] + '/' + str(chan23['direction'])
inv = l3.rpc.invoice(msatoshi='123000', label='label1', description='desc')['bolt11']
inv = l3.rpc.invoice(msatoshi=123000, label='label1', description='desc')['bolt11']
# Exclude the payer node id
with pytest.raises(RpcError, match=r'Payer is manually excluded'):
l1.rpc.pay(inv, exclude=[l1_id])
Expand Down