practicalswift
4f4756bd20
Fix a-vs-an typos
7 years ago
Rusty Russell
cc9ca82821
status: separate types for peer failure vs "impossible" failures.
Ideally we'd rename status_failed() to status_fatal(), but that's
too much churn for now.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
6ca0c6e0ec
test_lightningd: race fix for activation of channels in test_gossip_jsonrpc
```
> assert [c['active'] for c in l2.rpc.listchannels()['channels']] == [True, True]
E AssertionError: assert [True, False] == [True, True]
E At index 1 diff: False != True
E Full diff:
E - [True, False]
E + [True, True]
```
We don't actually wait that l2's gossipd has also processed the message.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Christian Decker
b3d4e161b5
pytest: Add test for `dev-forget-channel`
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Rusty Russell
d77972e827
test_lightningd.py: test io logging and toggling with SIGUSR1
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
ZmnSCPxj
711d8822b0
test_lightning: Update to new error message format.
7 years ago
Rusty Russell
b3534462e0
test_lightningd.py: fix race in test_fee_limits.
Sometimes the super-low-fee commitment tx succeeds, and we see
that 'sendrawtx exit 0' instead of the one we're expecting.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
07c275e436
test_lightningd: fix race in test_closing_different_fees
fundrawtransaction returns before the actual sendrawtx, so we can
end up mining blocks before it's sent, thus not having enough confirms.
We handle this correctly in fund_channel, but this test open-codes it
for speed with multiple peers.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
ZmnSCPxj
dcafce81ad
test_lightningd: Increase times in expiration waiting test.
Fixes : #916
Makes it less flaky, as, the increased times reduce the
relative delay in processing by slower machines.
7 years ago
Rusty Russell
37670c04e0
test_lightning.py: disable test which needs bitcoind 0.16 (for now!)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
William Casarin
3d27bbb47d
test: test_bech32_funding
1. Test wallet funding to a bech32 p2wpkh address
2. Test channel opening with this address
Signed-off-by: William Casarin <jb55@jb55.com>
7 years ago
William Casarin
0e59e091e7
test: switch invoice tests to use proper bip173 name
Signed-off-by: William Casarin <jb55@jb55.com>
7 years ago
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