cornwarecjp
859070a5ed
Terminate LightningD if, for some reason, it doesn't start properly. This cleans up the environment for future test runs.
7 years ago
cornwarecjp
71581ff96e
Terminate BitcoinD if, for some reason, it doesn't start properly. This cleans up the environment for future test runs.
7 years ago
ZmnSCPxj
87726d5b89
test_lightningd: Add test for reporting routing failures
7 years ago
ZmnSCPxj
131283af6e
test_lightningd: Move 0-payment test to its own test.
7 years ago
gdassori
72dd1461a0
async param is unwanted here
7 years ago
gdassori
b9b0b7ebe0
fix LightningRpc signatures according to tests
7 years ago
Rusty Russell
9825dddd18
test_lightning: test that we unwatch txs.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
6d0fd84c63
walletrpc: don't assert() when we pay ourselves.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
0d3eaef945
tests: add argument to is_in_log so we can check only recent log entries.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
dd044f826b
channeld: handle unexpected messages better.
In particular, decode error messages correctly and do the right thing with
messages about other channels.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
windsok
fc73b1eb72
remove stray semicolons in python tests
7 years ago
practicalswift
7e8f1945f2
Adjust tests to new log text
7 years ago
practicalswift
689db5b7c1
Onboarding: Make log output texts friendlier to new users
7 years ago
Christian Decker
45c935ddba
pytest: Have the db_query helper work on a copy of the DB
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Christian Decker
2e5047f74b
pytest: Fix test_pay_disconnect
We are now too quick in disabling the channel for us to attempt a
payment. We need to separate into getroute and sendpay to trigger this
now.
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Christian Decker
dafd000c2a
pytest: Check that we disable on closing and permfail.
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Rusty Russell
e66bd25b5c
test_lightningd.py: test lockin while we're not running.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Christian Decker
7b0d806d71
pytest: Check that we forget irrevocably settled channels
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Rusty Russell
f03dbde354
test_lightningd.py: Test 0-msatoshi pay
Based-on-patch-by: ZmnSCPxj <ZmnSCPxj@protonmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
practicalswift
96d093fb30
Fix typos
7 years ago
Christian Decker
ee850f38d6
pytest: Fix test_fee_limits
This was flaky because we didn't wait for the fee update to complete
and were using the old, way too small, fees, which upset bitcoind.
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Rusty Russell
8797159825
Use consistent names for timestamps.
Old fields still there, just deprecated.
Invoice commands:
paid_timestamp -> paid_at
expiry_time -> expires_at
decodepay:
timestamp -> created_at
getlog:
creation_time -> created_at
listpayments:
timestamp -> created_at
Suggested-by: @shesek
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
4f1dc91ba5
lightningd: rename --deprecated-apis to --allow-deprecated-apis.
Suggested-byL practicalswift
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Christian Decker
0c9d29065c
pytest: Remove some debug print statements
7 years ago
Christian Decker
b8b4998f7a
pytest: Temporarily disable alias and color checking for DEVELOPER=0
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Rusty Russell
5e0a5c9111
JSONRPC: delinvoice: have a status argument.
delinvoice was orginally documented to only allow deletion of unpaid
invoices, but there might be reasons to delete paid ones or unexpired ones.
But we have to avoid the race where someone pays as it's deleted: the
easiest way is to have the caller tell us the status, and fail if
it's wrong.
Fixes : #477
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
c8c68cfb7c
JSONRPC: listpeers multiple channels, output improvements.
We're going to have to support multiple channels per peer, even if only
when some are onchain. This would break the current listpeers, so
change it to an array (single element for now).
Other cleanups:
1. Only set connected true if daemon is not onchaind.
2. Only show netaddr if connected; don't make it an array, call it `address`
in comparison with `addresses` in listnodes.
3. Rename `channel` to `short_channel_id`
4. Add `funding_txid` field for voyeurism.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
78672738ff
test_lightningd.py: remove deprecated APIs.
Individual tests can always re-enable them, though.
[ More test fallout fixes by Christian Decker ]
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
bd010d4b96
listinvoices: deprecate 'complete' in favor of 'status' trinary.
[ Manpage regen fixup by Christian Decker ]
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
67b7362986
test_lightningd.py: switch to listinvoices instead of listinvoice.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
962514c3a0
addfunds: remove.
We now detect funds, so this is just confusing.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
2f2cacef0d
JSONRPC: output from listpeers should be 'id' not 'peerid'.
That's what we use everywhere else.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
5698a133c2
JSONRPC: rename getpeers to listpeers.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
34a994c7db
JSONRPC: listpayments not return a naked array.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
6e703ad977
JSONRPC: listpayments can list just a specific bolt11 or payment_hash.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
06c4f6ddca
JSONRPC: add optional short_channel_id argument to listchannels
In order to just list one (though it may return two entries, one for each
channel direction!).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
7fdb30cbda
JSONRPC: rename getchannels to listchannels
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
e1e7f289fb
JSONRPC listnodes: return timestamp, alias and color.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
ced572b973
JSONRPC: getnodes: rename to listnodes.
Like listinvoice, and add optional 'id' parameter to ask about a
specific node.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
practicalswift
aefc887521
Fix typos
7 years ago
ZmnSCPxj
a88c73a41b
invoices: Add `paid_timestamp` field.
Fixes : #615
7 years ago
Rusty Russell
15aaf9f49a
test_lightning.py: shutdown tail thread before killing.
Seems to avoid the nasty python resource warnings, as well as the
fatal 'ValueError: PyMemoryView_FromBuffer(): info->buf must not be NULL'
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
4b178621e2
test_lightningd.py: test that payments are pending even before HTLC committed.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
469faa476e
test_lightning.py: test for persistence.
Also note that failing an in-progress payment (instead of waiting) is
pretty weird.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Christian Decker
ad5eb1f7e1
pytest: Skip test_fee_limits for DEVELOPER=0
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Rusty Russell
79dc44713b
channeld: --ignore-fee-limits as a hack for fee disparities.
This, of course, should never be used. But it helps maintain connections
for the moment while we dig deeper into feerates.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
practicalswift
145e26371d
Add test for too-short decodepay (credit: @ZmnSCPxj )
7 years ago
Rusty Russell
fc151e10cd
test_lightning.py: check error on too-large funding tx.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Christian Decker
6f4fca3a6f
pytest: Verify that we forget nodes that have no channels anymore
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Christian Decker
4fe83cd405
pytest: Test for channel removal in test_gossip_pruning
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago