Commit graph

33 commits

Author SHA1 Message Date
Matt Corallo
4291cb99d4 Add some trace logging in peer_handler 2018-08-16 23:11:22 -04:00
Antoine Riard
0029f04fce Logging interface
Implement error, warn, info, debug and trace macros, internally calling
an instance of Logger, and passing it to every main structures
Build-time or client-side filtering.
Issue #54
2018-08-17 00:01:15 +00:00
Antoine Riard
e752611247 Implement HandleError event with ErrorAction field 2018-08-12 00:36:48 +00:00
Matt Corallo
bdd77ae1fa Do not pass DisconnectPeer events upstream to the client 2018-07-24 22:33:12 -04:00
Matt Corallo
af5c6e8186 PendingHTLCsForwardable really should just be upstreamed.
This is just a comment/docs/function rename change
2018-07-24 22:33:10 -04:00
Antoine Riard
20fa9d331d Add DisconnectPeer events
Add test for DisconnectPeer event
Update DisconnectPeer with optional ErrorMessage
Manage error for funding_transaction_generated
Add disconnect_socket to SocketDescriptor trait
2018-07-23 14:31:44 -04:00
Antoine Riard
1c12e83941 Implement ErrorMessage msg and ErrorAction::SendErrorMessage + fuzz test 2018-07-23 14:31:44 -04:00
Matt Corallo
7b4f382e26 Move shutdown sending to an event 2018-07-22 23:22:15 -04:00
Matt Corallo
951c1d4145 Clarify get_peer_node_ids docs a bit 2018-07-22 13:11:58 -04:00
Yuntai Kyong
9679f708dc add two methods for the issue #56
peer_handler::get_peer_node_ids() get connected peers' node_id
router::get_addresses() to get network addresses by node_id
2018-07-22 15:19:20 +09:00
Savil Srivastava
fd141bbed2 [Error] rename msg field to action
this was a TODO and also briefly discussed in https://github.com/rust-bitcoin/rust-lightning/pull/43#pullrequestreview-135649551

I'm not fully sure how to remove the `Option`, and make it completely required. Would love suggestions. So, have omitted that for now. Plus, better to make smaller, incremental changes.

Test Plan:
`cargo build`
`cargo test`
2018-07-19 20:01:55 -07:00
Matt Corallo
c47525cb84 Move open_channel message handling into an event
This simplifies client usage cause peer_handler doesn't have an
interface to shove arbitrary messages in.
2018-07-06 17:31:01 -04:00
Matt Corallo
e98e1e2fdc Add warning about aut-close()-fd-races for peer_handler impls 2018-07-03 11:26:49 -04:00
Matt Corallo
deedc69a64 Fix Pong response attempt-to-encode-oversize-msg panic 2018-06-27 17:00:05 -04:00
Matt Corallo
e3effa4622 Send initial_routing_sync-filled Init messages to the first 5 peers 2018-06-16 19:46:49 -04:00
Matt Corallo
05e2a7dc48 Support responding to Ping messages in peer_handler 2018-06-16 19:46:49 -04:00
Matt Corallo
33771194d8 Work around lnd sending invalid messages 2018-06-16 19:45:32 -04:00
Matt Corallo
d7b33fcd84 Support ignoring some errors, deserialize empty flags types 2018-06-16 19:45:32 -04:00
Matt Corallo
0595dbee37 Make PeerHandleError Error impl public 2018-06-14 18:05:13 -04:00
Matt Corallo
a20eef17c9 Fix local route update broadcasts, annouce channel closures 2018-04-24 20:42:24 -04:00
Matt Corallo
8e2974fc2a HTLC Failure message handling 2018-04-24 11:55:08 -04:00
Matt Corallo
374ea1f05e Completely rewrite channel HTLC tracking and processing
It obviously was nonsensical prior, though its now way more
complicated...there's refactoring work to be done here, but it
should at least kinda sorta work now.
2018-04-16 20:35:21 -04:00
Matt Corallo
91b964ae1f Basic error handling framework in peer_handler 2018-04-02 18:31:23 -04:00
Matt Corallo
4fbc0b3768 Require Init as first message, send our own Init for outbound 2018-04-02 18:31:23 -04:00
Matt Corallo
f452403a3f Fix a small bug in peer_handler 2018-04-02 18:07:03 -04:00
Matt Corallo
cf6308a5ae Expose event-processing loop from peer_handler. 2018-04-02 18:07:03 -04:00
Matt Corallo
c528ff3650 Handle incoming shutdown messages 2018-04-02 18:07:02 -04:00
Matt Corallo
9606f94caf Stop freeing holding cell in updates, fix freeing in revoke 2018-03-25 17:02:28 -04:00
Matt Corallo
40ab09f627 Clarify roles in failing HTLCs, impl it, support rebalances 2018-03-22 17:35:30 -04:00
Matt Corallo
ac3bf5b71d Fix length requirement in peer_handler msg decode 2018-03-20 16:42:04 -04:00
Matt Corallo
4150c281e7 Fix a few bugs in peer_handler 2018-03-19 17:46:37 -04:00
practicalswift
e7d0d8af9f Fix typos 2018-02-27 23:38:52 +01:00
Matt Corallo
6185a28190 initial checkin 2018-02-16 18:09:48 -05:00