Christian Decker
81551b2e60
pytest: Increate timeout when waiting for gossip
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Christian Decker
739e78a8c7
gossip: Reduce verbosity
Now we only report serious failures, or messages that actually changed
the local view.
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
ZmnSCPxj
0925e404d6
test_lightningd.py: Test new expiration system in more detail.
7 years ago
ZmnSCPxj
4ac5d123d6
test_lightningd: Test missing arguments.
7 years ago
Rusty Russell
a497a9943d
test_lightning.py: speed up test_closing_different_fees
It was taking over 10 minutes under valgrind, causing Travis to time it out.
This shrinks it to its essential tests, and also batches.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
f527f39613
test_lightning: add tests for closing with differetn feerates.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
alaniz
b7856e3512
Onboarding: tweak grammar conventions for RPC responses
7 years ago
Rusty Russell
d1ab2e05f4
test_lightningd.py: test lightning-cli.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
327e2b8fd8
JSONRPC: listconfigs command.
With the new 'human-readable' mode of lightning-cli, this actually produces
a valid config file. It's a bit hacky though...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
0600aac68f
lightningd: rename --no-reconnect to --dev-no-reconnect.
It's a dev option.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
cornwarecjp
6112df3a90
Bring back the time-out on the start-up of bitcoind, but make it 60 seconds instead of the original 10 seconds. This is much larger than the normal start-up time of bitcoind (so we should never hit the time-out), but still lets a test terminate in a reasonable time in the unlikely case that bitcoind hangs.
7 years ago
cornwarecjp
896f7ef37d
Make it possible to run the test suite in Python 3.4 (bytes.hex was introduced in 3.5)
7 years ago
cornwarecjp
0b0708d86a
Bitcoind should always eventually finish starting, but there is no guarantee on how long it takes, so don't apply a time-out. In case bitcoind hangs indefinitely, the test will hang indefinitely too, but this should be solved in bitcoind, not in the test code.
7 years ago
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