Matt Corallo
c52825d5f1
Fix UpdateAddHTLC serialize vec capacity default
2018-08-02 22:37:28 -04:00
Savil Srivastava
ca6b44b8cc
replace use of bitcoin::utils::misc::hex_bytes with hex::decode
...
as requested in #84 discussion
https://github.com/rust-bitcoin/rust-lightning/pull/84#discussion_r205508845
2018-07-27 18:19:00 -07:00
Matt Corallo
66023b7886
Update NodeAnnouncement addr deserialization to check addr len.
...
This more aggressively checks the message contents are correct
before returning WrongLength so existing fuzz setup has an easier
time.
2018-07-25 15:57:36 -04:00
Matt Corallo
d4bb39a1dd
Ensure all msg deserialization can provide extra bytes, rename err
2018-07-25 15:56:46 -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
ac941e19c9
Remove dangling spaces from #75
2018-07-22 23:54:30 -04:00
Savil Srivastava
0c1f47807a
[msgs::ChannelReestablish] implement encoding and decoding
...
Summary:
Implementing these, taking inspiration from the surrounding code since i'm a rust n00b.
Test Plan:
```
cargo build
cargo test channel_reestablish
```
output:
```
running 3 tests
test ln::msgs::tests::encoding_channel_reestablish_with_secret ... ok
test ln::msgs::tests::decode_channel_reestablish_bad_length ... ok
test ln::msgs::tests::encoding_channel_reestablish_no_secret ... ok
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 14 filtered out
```
2018-07-22 23:26:47 -04:00
Matt Corallo
e93c9fbeaf
Migrate all Uint256s used for channel_ids to [u8; 32]
2018-07-22 18:55:20 -04:00
Savil Srivastava
14c02c0652
update TODO message for renaming "msg" field of HandleError struct
2018-07-19 20:01:55 -07: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
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
d7b33fcd84
Support ignoring some errors, deserialize empty flags types
2018-06-16 19:45:32 -04:00
Matt Corallo
5481a5d653
Provide Send + Sync on message handlers (just changes trait)
2018-06-14 18:05:13 -04:00
Yuntai Kyong
fb1bf30263
filling unimplemented!() for many messages' encoding/decoding routines
2018-05-12 14:30:26 +09:00
Matt Corallo
8e2974fc2a
HTLC Failure message handling
2018-04-24 11:55:08 -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
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
df9367adaf
Rename ErrorMessage
2018-04-02 18:31:23 -04:00
Matt Corallo
7b0a25bdce
Fix message decoding for features, build some encoding
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
942d760b83
impl more message decoders
2018-03-25 17:02:28 -04:00
Matt Corallo
298557c891
impl a bunch of additional messages, remove some useless mut
2018-03-22 17:43:20 -04:00
Matt Corallo
40ab09f627
Clarify roles in failing HTLCs, impl it, support rebalances
2018-03-22 17:35:30 -04:00
Matt Corallo
deb23a9309
Allow messages to be too long in accorance with spec
2018-03-20 14:03:33 -04:00
Matt Corallo
4f4c0a8179
Impl a few more msg deserializations, fix a channel panic!() bug
2018-03-19 17:46:37 -04:00
Riccardo Casatta
b94365f3f5
use ? instead of try macro
2018-03-01 09:54:56 +01:00
Matt Corallo
6185a28190
initial checkin
2018-02-16 18:09:48 -05:00