Rusty Russell
309dc96f97
fixup! More test fixups from last patch.
2018-02-23 18:02:00 +01:00
Rusty Russell
cccdb53bec
channel_states: fold all the ONCHAIND states into one.
...
The billboard is now far more useful to tell what's going on, and this
gets us closer to a state == owner mapping.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-02-23 18:02:00 +01:00
Rusty Russell
866ba00445
test_lightning.py: test in billboard in various closing cases.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-02-23 18:02:00 +01:00
Rusty Russell
8946ecc7b5
onchaind: keep billboard uptodate.
...
This uses the permanent slot to indicate what's happening overall, and
the transient slot is updates with what we expect to happen next.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-02-23 18:02:00 +01:00
Rusty Russell
7e0f2c4d26
onchaind: two small changes.
...
I generally tried not to alter internal logic to add billboards (to avoid
breakage), but these two make things neater.
1. Free ->proposal if it's not longer valid. That way we don't get confused
by reporting old proposals.
2. Change all_irrevocably_resolved() to num_not_irrevocably_resolved() so
we can report that number to the billboard.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-02-23 18:02:00 +01:00
Rusty Russell
c57aa628e3
closingd: update billboard as negotiation proceeds.
...
We use the permanent slot to indicate our overall negotiation range,
and the transient slot to say what we're waiting for.
On success, we update the permanent slot to indicate the final value.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-02-23 18:02:00 +01:00
Rusty Russell
8640a5c329
channeld: keep billboard uptodate.
...
For the moment, this just tracks the lockin, announce and shutdown
statuses.
We currently have trouble telling when we're stuck in
CHANNELD_AWAITING_LOCKIN who has sent the transaction.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-02-23 18:02:00 +01:00
Rusty Russell
10361d5308
openind: update billboard.
...
This mainly lets us know if we're blocked on reading from peer.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-02-23 18:02:00 +01:00
Rusty Russell
9cffa03647
peer_failed: set permanent slot when we fail the peer.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-02-23 18:02:00 +01:00
Rusty Russell
8aa7a48138
listpeers: display billboard as 'status' array.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-02-23 18:02:00 +01:00
Rusty Russell
d4a172e221
common: peer_billboard() helper for updating the billboard.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-02-23 18:02:00 +01:00
Rusty Russell
cca0a5412e
subd: clear transient billboard on start and shutdown.
...
Use NULL on the callback to mean "clear the slot", and call it.
We have do this in two places: the old daemon might die, or the new
daemon might start first.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-02-23 18:02:00 +01:00
Rusty Russell
26b004e5af
subd: handle status_peer_billboard messages from subdaemons.
...
We use a callback which updates the appropriate slot.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-02-23 18:02:00 +01:00
Rusty Russell
db4de95033
lightningd: single transient billboard for opening peers.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-02-23 18:02:00 +01:00
Rusty Russell
86a04c59d4
lightningd: maintain a status billboard for each channel.
...
Each state (effectively, each daemon) has two slots: a permanent slot
if something permanent happens (usually, a failure), and a transient
slot which summarizes what's happening right now.
Uncommitted channels only have a transient slot, by their very nature.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-02-23 18:02:00 +01:00
Christian Decker
d499c34db2
fixup! options: Add --offline
to disable listening and auto-reconnection
2018-02-23 06:30:15 +00:00
Christian Decker
6f6176a91e
options: Add --offline
to disable listening and auto-reconnection
2018-02-23 06:30:15 +00:00
practicalswift
0a20bd44f0
Fix flake8 warnings: W191 indentation contains tabs + E101 indentation contains mixed spaces and tabs
2018-02-22 22:21:31 +01:00
practicalswift
e18948a6a9
Remove unused variables. Fix flake8 warnings.
2018-02-22 22:21:31 +01:00
Rusty Russell
b8c636514b
pong: embed version string into ping replies if DEVELOPER=1.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-02-22 12:24:26 +01:00
Rusty Russell
85f1a9b825
lightningd: append (as much as we can) version into default name if DEVELOPER=1
...
This helps for bug reporting, where we may need to diagnose the other
end.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-02-22 12:24:26 +01:00
Rusty Russell
655ae90e5e
wallet: remove obsolete peers.
...
Fixes : #1029
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-02-22 12:06:39 +01:00
practicalswift
ae7d857c44
Make Python code conform to the Python PEP 8 style guide
2018-02-22 10:47:19 +01:00
practicalswift
0ac5e93065
Remove unused parameters a_sent and b_sent in draw_restart(.., struct sent **a_sent, struct sent **b_sent, ...)
2018-02-22 10:46:30 +01:00
practicalswift
2e7791f798
Remove unused parameter ci in db_send_local_revoke(..., const struct commit_info *ci)
2018-02-22 10:46:30 +01:00
practicalswift
31fed45d10
Remove unused parameters peer and sig in db_send_remote_commit(struct peer *peer, ..., struct signature sig)
2018-02-22 10:46:30 +01:00
practicalswift
7a5ce1db7d
Remove unused parameter shaseed in handle_their_unilateral(..., const struct sha256 *shaseed, ...)
2018-02-22 10:46:30 +01:00
practicalswift
6682248b91
Remove unused parameter tx in handle_mutual_close(const struct bitcoin_tx *tx, ...)
2018-02-22 10:46:30 +01:00
practicalswift
1b51b5ae0f
Remove unused parameter topo in txw_fire(struct chain_topology *topo, ...)
2018-02-22 10:46:30 +01:00
practicalswift
0046ace318
Remove unused parameter topo in txowatch_fire(struct chain_topology *topo, ...)
2018-02-22 10:46:30 +01:00
practicalswift
74841ef567
Remove unused parameter payment_hash in forward_htlc(..., const struct sha256 *payment_hash, ...)
2018-02-22 10:46:30 +01:00
practicalswift
d873bf60bf
Remove unused parameter fieldname in json_add_log(..., const char *fieldname, ...)
2018-02-22 10:46:30 +01:00
practicalswift
2ab274595e
Remove unused parameter ptr in corrupt(const void *ptr, ...)
2018-02-22 10:46:30 +01:00
practicalswift
f24eae60b7
Remove unused parameter why in delete_channel(..., const char *why)
2018-02-22 10:46:30 +01:00
practicalswift
99ce580e20
Remove unused parameter rstate in routing_failure_on_nc(struct routing_state *rstate, ...)
2018-02-22 10:46:30 +01:00
practicalswift
0013caedfe
Remove unused parameter rstate in get_out_node_connection_of(struct routing_state *rstate, ...)
2018-02-22 10:46:30 +01:00
practicalswift
a3cd9495ef
Remove unused parameter rstate in delete_connection(struct routing_state *rstate, ...)
2018-02-22 10:46:30 +01:00
practicalswift
e1f7428864
Remove unused parameter allow_mistakes in init_feerange(..., bool allow_mistakes)
2018-02-22 10:46:30 +01:00
practicalswift
e28b646f4b
Remove unused parameter their_offer in tell_master_their_offer(u64 their_offer, ...)
2018-02-22 10:46:30 +01:00
practicalswift
7f8ae7e0bf
Remove unused parameter master in load_hsm(struct daemon_conn *master)
2018-02-22 10:46:30 +01:00
practicalswift
f5742b0928
Remove unused parameter master in create_new_hsm(struct daemon_conn *master)
2018-02-22 10:46:30 +01:00
practicalswift
7be95cee94
Remove unused parameter ctx in wallet_peer_load(const tal_t *ctx, ...)
2018-02-22 10:46:30 +01:00
practicalswift
1f46262278
Remove unused parameter testname in create_test_db(const char *testname)
2018-02-22 10:46:30 +01:00
practicalswift
7dad639c49
Remove unused parameter msg in handle_funding_announce_depth(..., const u8 *msg)
2018-02-22 10:46:30 +01:00
practicalswift
f15868a94d
Remove unused function json_dev_broadcast(...)
2018-02-22 09:45:22 +00:00
Rusty Russell
3e7d98a52d
status: don't log gossip messages in channeld.
...
Looking at an example log from #968 , 288612 of 289244 lines were simply
channeld logging incoming and outgoing gossip.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-02-22 08:22:44 +00:00
Rusty Russell
b536e97df2
dev_ping: don't crash with silly values.
...
It's a dev command, but still.
Fixes : #985
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-02-22 01:10:09 +00:00
practicalswift
91a9c2923f
Mark intentionally unused parameters as such (with "UNUSED")
2018-02-22 01:09:12 +00:00
practicalswift
3dbace3421
Remove redundant casts to same type
2018-02-21 13:07:40 +01:00
Rusty Russell
369d3ab46e
fixup! Close memory leak, make error exposure DEVELOPER=1 only.
2018-02-21 12:59:26 +01:00