Rusty Russell
994addadce
state: INPUT_CONNECTION_LOST
...
We used to have a hacky close timeout which would immediately fire
when we'd closed because the connection was down. Far better to have
a specific "connection lost" input, and have it respond like CMD_CLOSE.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-03-24 12:09:44 +10:30
Rusty Russell
6410b0ac9c
test: don't reply on specific bitcoin.conf settings.
...
I changed mine off regtest, and "make check" broke. Fix that.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-03-15 17:08:42 +10:30
Rusty Russell
3fbee72f3a
daemon/test: make --verbose flag less verbose.
...
Just print out the commands we do, not -x which gives TMI.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-03-08 10:35:15 +10:30
Rusty Russell
ae82c0a12c
daemon/test: Make --gdb1/--gdb2 actually work, clean up params.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-03-08 10:34:15 +10:30
Rusty Russell
16a7e3dc97
daemon/test: always test with valgrind, don't print errors unless a problem.
...
Unfortunately this seems to require longer sleeps.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-03-08 10:33:15 +10:30
Rusty Russell
48a4ec88dd
daemon/test/test.sh: remove -x flag, add --verbose option.
...
--verbose also turns on grep outputs.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-03-08 10:29:15 +10:30
Rusty Russell
862509637b
daemon: implement unilateral commit.
...
This is only for the simple case where there are no HTLCs.
We group the current commit information together in the struct;
this involves a trivial transform from peer->cur_commit_theirsig to
peer->cur_commit.theirsig.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-01-22 06:45:28 +10:30
Rusty Russell
b70c18a40e
daemon: implement anchor watch timeout.
...
We abort when this happens, but still worth testing.
This involves a refactor so we can allocate watches off a specific context,
for easy freeing when they're no longer wanted.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-01-22 06:45:28 +10:30
Rusty Russell
168ed96b12
daemon: close command.
...
This performs a mutual close.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-01-22 06:45:28 +10:30
Rusty Russell
b76858c1a1
daemon: implement HTLC expiry.
...
We do the simplest thing: a timer goes off, and we check all HTLCs for
one which has expired more than 30 seconds ago.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-01-22 06:45:28 +10:30
Rusty Russell
1018823f97
daemon: HTLC expiry limits.
...
Don't accept an HTLC which is about to expire, nor one which will take
too long to expire.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-01-22 06:45:28 +10:30
Rusty Russell
2346f6bf14
daemon: routefail command.
...
This should be renamed: it's actually any kind of after-the-fact failure.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-01-22 06:45:28 +10:30
Rusty Russell
86f4bd772c
daemon/test/test.sh: check_status() helper for HTLC status checks.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-01-22 06:45:28 +10:30
Rusty Russell
1e82799852
daemon: fulfillhtlc command
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-01-22 06:45:28 +10:30
Rusty Russell
17359279b2
daemon: getpeers: list HTLCs.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-01-22 06:45:28 +10:30
Rusty Russell
6bdaa5d1ca
daemon: newhtlc command.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-01-22 06:45:27 +10:30
Rusty Russell
8f0e10309a
daemon: --bitcoind-poll=<seconds>
...
Speeds up testing significantly.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-01-22 06:45:27 +10:30
Rusty Russell
6443629f6a
daemon/test/test.sh: add --valgrind and --gdb options.
...
We add a second to the sleep, as valgrind can be a little slow.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-01-22 06:45:27 +10:30
Rusty Russell
f5538bd1d2
daemon: test scripts.
...
We comment out the peer_create_close_tx() abort for now, so we
can test.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-01-22 06:45:27 +10:30