Commit graph

282 commits

Author SHA1 Message Date
Matt Corallo
f5225a18b7 Fix chan_utils indentation issue 2018-06-29 16:44:19 -04:00
Matt Corallo
aec0fa485c A few minor test cleanups and remove new warnings from #32 2018-06-29 16:44:19 -04:00
Matt Corallo
04b0acc9dc Skip some a needless temporary vec and clean indentation after #32 2018-06-29 16:44:19 -04:00
Matt Corallo
f9ec0a76d4
Merge pull request #32 from ariard/prune_payment_preimages
Add pruning of preimages no longer needed + tests
2018-06-29 16:43:56 -04:00
Jean Pierre Dudey
d0e9137bc5 Add the OutPoint type for the ChannelMonitor's funding_txo field.
This structure replaces the (Sha256dHash, u16) tuple that was being used
for the funding output.

Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com>
2018-06-29 12:12:17 -04:00
Antoine Riard
ef166420b0 Add pruning of preimages no longer needed + tests 2018-06-28 23:19:24 +00: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
738638fad4 Remove bitcoincorerpcchain, as it belongs in a separate crate 2018-06-14 18:05:13 -04:00
Matt Corallo
5481a5d653 Provide Send + Sync on message handlers (just changes trait) 2018-06-14 18:05:13 -04:00
Matt Corallo
f462d8ac70 fuzztarget sha -> XOR, crates secp256k1 2018-06-04 20:02:07 -04:00
Yuntai Kyong
fb1bf30263 filling unimplemented!() for many messages' encoding/decoding routines 2018-05-12 14:30:26 +09:00
Matt Corallo
22342134ef Some with_capacity's 2018-04-26 19:45:36 -04:00
Matt Corallo
a20eef17c9 Fix local route update broadcasts, annouce channel closures 2018-04-24 20:42:24 -04:00
Matt Corallo
2d8afeccdb Rewrite channelmonitor framework and implement a bunch of it 2018-04-24 20:42:24 -04:00
Matt Corallo
7400b3bb7c Fix some channel remove channelmanager consistency bugs 2018-04-24 16:01:14 -04:00
Matt Corallo
8e2974fc2a HTLC Failure message handling 2018-04-24 11:55:08 -04:00
Matt Corallo
53d1518566 Move ChannelKeys creation into channelmanager 2018-04-17 12:43:12 -04:00
Matt Corallo
1ec9c3aa4b Provide fallback for crypto's fixed_time_eq on non-x86/arm targets 2018-04-16 20:35:21 -04:00
Matt Corallo
4d75d4c099 Minor cleanups 2018-04-16 20:35:21 -04:00
Matt Corallo
f5ca346011 Fix commitment transaction number/per_commitment_point tracking 2018-04-16 20:35:21 -04:00
Matt Corallo
0940db25ec Refactor channelmanager network tests significantly 2018-04-16 20:35:21 -04:00
Matt Corallo
e9f9cda986 impl more message encodings 2018-04-16 20:35:21 -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
e2b1b1be78 Prep HTLCFailReason for Channel holding it until revoke_and_ack 2018-04-16 20:35:21 -04:00
Matt Corallo
00c6f42452 Use libbitcoinconsensus to check tx validity in some tests 2018-04-16 20:35:19 -04:00
Matt Corallo
8b1a7ede27 Test that channel monitors get updated appropriately 2018-04-16 20:35:03 -04:00
Matt Corallo
021b3643cc Hand payment preimages into channel monitors when claimed 2018-04-16 20:35:03 -04:00
Matt Corallo
644119201d Remove useless htlc_redeemscript argument 2018-04-02 18:31:23 -04:00
Matt Corallo
e79e61f595 Clean up channel error handling a ton 2018-04-02 18:31:23 -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
df9367adaf Rename ErrorMessage 2018-04-02 18:31:23 -04:00
Matt Corallo
b21048a1ce Check funding txout format when transaction is confirmed in channel 2018-04-02 18:07:03 -04:00
Matt Corallo
f452403a3f Fix a small bug in peer_handler 2018-04-02 18:07:03 -04:00
Matt Corallo
7b0a25bdce Fix message decoding for features, build some encoding 2018-04-02 18:07:03 -04:00
Matt Corallo
8938cd7d78 Expand full_stack_target from uselessly-large to laughably-large 2018-04-02 18:07:03 -04:00
Matt Corallo
187ca8c0c8 Make Channel non-public except in fuzztarget mode, bump version 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
8e79c05a20 Add support for initiating channel closure to Channel{,Manager} 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
890e3cb165 Update for new rust-bitcoin API, avoid some duplicate hashing 2018-04-02 18:06:59 -04:00
Matt Corallo
93f47f5421 Fix double-locking in channelmanager 2018-03-25 17:02:28 -04:00
Matt Corallo
7bb290fe3a Stop allowing new commitments without updates/revoke 2018-03-25 17:02:28 -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
89d9f8fb0e Fix update_fee handling, add TODOs 2018-03-25 17:02:28 -04:00