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
Rusty Russell
9842e32e06
lightningd: expose internal error information.
...
In #1018 we got no information, except "Internal error". At least
if we tell the other side what went wrong, we're more likely to get
an answer.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-02-21 12:59:26 +01:00
Rusty Russell
1192f16733
lightningd: fix crash when htlc failed and source is onchain.
...
If the source channel is onchain, we try to send a message to onchaind
which (1) doesn't care, (2) doesn't take a channel_fail_htlc msg, and
(3) causes us to crash in subd.c:
assert(!strstarts(sd->msgname(fromwire_peektype(msg_out)), "INVALID"));
Fixes : #821
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-02-20 22:58:48 +01:00
Rusty Russell
e92b710406
tools/generate-wire.py: remove length argument from fromwire_ routines.
...
We always hand in "NULL" (which means use tal_len on the msg), except
for two places which do that manually for no good reason.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-02-20 22:36:21 +01:00
Rusty Russell
719290a4c4
txwatch: remove unused callback arg, hide struct definitions.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-02-20 22:36:21 +01:00
Rusty Russell
ae8fb96d06
lightningd/channel_control: routines to control channeld (move from peer_control.c)
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-02-20 22:36:21 +01:00
Rusty Russell
36652a3df3
lightningd/peer_control: reorder, move more functions out.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-02-20 22:36:21 +01:00
Rusty Russell
372040bbd5
lightningd/onchain_control: routines to control onchaind (move from peer_control.c)
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-02-20 22:36:21 +01:00
Rusty Russell
9176ee628c
lightningd/closing_control: routines to control closingd (move from peer_control.c)
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-02-20 22:36:21 +01:00
Rusty Russell
a83ff83328
lightningd/connect_control: routines to control connecting (move from peer_control.c)
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-02-20 22:36:21 +01:00