mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
plugins/sql: add listpeerchannels support.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Alex Myers
parent
51ae7118f1
commit
8a0ee5f56e
@@ -205,7 +205,7 @@ plugins/fetchinvoice: $(PLUGIN_FETCHINVOICE_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_CO
|
||||
plugins/funder: bitcoin/psbt.o common/psbt_open.o $(PLUGIN_FUNDER_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS)
|
||||
|
||||
# This covers all the low-level list RPCs which return simple arrays
|
||||
SQL_LISTRPCS := listchannels listforwards listhtlcs listinvoices listnodes listoffers listpeers listtransactions listsendpays
|
||||
SQL_LISTRPCS := listchannels listforwards listhtlcs listinvoices listnodes listoffers listpeers listpeerchannels listtransactions listsendpays
|
||||
SQL_LISTRPCS_SCHEMAS := $(foreach l,$(SQL_LISTRPCS),doc/schemas/$l.schema.json)
|
||||
# We squeeze:
|
||||
# descriptions (we don't need)
|
||||
|
||||
@@ -3302,6 +3302,9 @@ def test_sql(node_factory, bitcoind):
|
||||
ret = l3.rpc.sql("SELECT * FROM peers;")
|
||||
assert len(only_one(ret['rows'])) == 4
|
||||
|
||||
ret = l3.rpc.sql("SELECT * FROM peerchannels;")
|
||||
assert len(only_one(ret['rows'])) == 57
|
||||
|
||||
l3.rpc.offer(1, 'desc')
|
||||
ret = l3.rpc.sql("SELECT * FROM offers;")
|
||||
assert len(only_one(ret['rows'])) == 6
|
||||
|
||||
Reference in New Issue
Block a user