rust-lightning
5 years agoHandle duplicate payment_hash send_payment()s 2018-07-duplicate_hash
Matt Corallo [Thu, 26 Jul 2018 19:44:27 +0000 (15:44 -0400)]
Handle duplicate payment_hash send_payment()s

We don't bother doing anything smart, we just return an Err in
case we have a pending outbound HTLC with the payment_hash provided
for the send.

This doesn't resolve the TODO as users can still send duplicative
payments that have the same payment_hash as was already sent,
though the docs are updated and hopefully users do so on their own.

5 years agoMerge pull request #93 from TheBlueMatt/2018-07-announce-bug
Matt Corallo [Thu, 26 Jul 2018 19:34:39 +0000 (15:34 -0400)]
Merge pull request #93 from TheBlueMatt/2018-07-announce-bug

Properly calculate Channel::announce_publicly

5 years agoRemove excess mut warned on in 1.22 2018-07-announce-bug
Matt Corallo [Thu, 26 Jul 2018 18:58:59 +0000 (14:58 -0400)]
Remove excess mut warned on in 1.22

5 years agoProperly calculate Channel::announce_publicly
Matt Corallo [Thu, 26 Jul 2018 18:33:01 +0000 (14:33 -0400)]
Properly calculate Channel::announce_publicly

For some reason we were only setting "announce_publicly" when
Channel::new_from_req had announce_publicly set to true and the
open_channel message had the relevant flag set. However, this
resulted in us rejecting peers for sending unsolicited
announcement_signatures messages, despite them having indicated,
and us having accepted, their announce-bit-set open_channel.

5 years agoMerge pull request #90 from TheBlueMatt/2018-07-percent-bump
Matt Corallo [Thu, 26 Jul 2018 16:48:28 +0000 (12:48 -0400)]
Merge pull request #90 from TheBlueMatt/2018-07-percent-bump

Bump README percent usable

5 years agoFix some tab-space errors in #84 2018-07-percent-bump
Matt Corallo [Thu, 26 Jul 2018 15:57:02 +0000 (11:57 -0400)]
Fix some tab-space errors in #84

5 years agoACHIEVEMENT UNLOCKED
Matt Corallo [Wed, 25 Jul 2018 03:02:27 +0000 (23:02 -0400)]
ACHIEVEMENT UNLOCKED

5 years agoMerge pull request #84 from savil/sort_outputs
Matt Corallo [Thu, 26 Jul 2018 15:54:17 +0000 (11:54 -0400)]
Merge pull request #84 from savil/sort_outputs

[RFC][Tx Sort] Implement sorting of inputs

5 years agoMerge pull request #92 from savil/editorconfig-fix
Matt Corallo [Thu, 26 Jul 2018 03:46:40 +0000 (23:46 -0400)]
Merge pull request #92 from savil/editorconfig-fix

fix editorconfig so it applies to every file

5 years agoadding BIP69 test-cases
Savil Srivastava [Tue, 24 Jul 2018 20:05:43 +0000 (13:05 -0700)]
adding BIP69 test-cases

5 years agofix editorconfig so it applies to every file
Savil Srivastava [Thu, 26 Jul 2018 01:14:06 +0000 (18:14 -0700)]
fix editorconfig so it applies to every file

5 years agoMerge pull request #89 from TheBlueMatt/2018-07-route-fuzz-fix-1
Matt Corallo [Wed, 25 Jul 2018 22:44:41 +0000 (18:44 -0400)]
Merge pull request #89 from TheBlueMatt/2018-07-route-fuzz-fix-1

Fix fee addition overflow in get_route

5 years agoFix fee addition overflow in get_route 2018-07-route-fuzz-fix-1
Matt Corallo [Wed, 25 Jul 2018 21:45:03 +0000 (17:45 -0400)]
Fix fee addition overflow in get_route

5 years agoMerge pull request #87 from savil/editorconfig
Matt Corallo [Wed, 25 Jul 2018 22:08:38 +0000 (18:08 -0400)]
Merge pull request #87 from savil/editorconfig

add .editorconfig to ensure we use tabs, not spaces

5 years agoMerge pull request #88 from TheBlueMatt/2018-07-new-fuzzing
Matt Corallo [Wed, 25 Jul 2018 21:03:24 +0000 (17:03 -0400)]
Merge pull request #88 from TheBlueMatt/2018-07-new-fuzzing

Add Router Fuzz Target

5 years agoOnly abort channel_target fuzz test on Err if ErrorAction says to 2018-07-new-fuzzing
Matt Corallo [Wed, 25 Jul 2018 16:26:03 +0000 (12:26 -0400)]
Only abort channel_target fuzz test on Err if ErrorAction says to

5 years agoAdd router_target to fuzzing which fuzzes router msgs + get_route
Matt Corallo [Wed, 25 Jul 2018 19:28:25 +0000 (15:28 -0400)]
Add router_target to fuzzing which fuzzes router msgs + get_route

5 years agoCatch fee overflow panic in get_route
Matt Corallo [Wed, 25 Jul 2018 20:24:53 +0000 (16:24 -0400)]
Catch fee overflow panic in get_route

5 years agoUpdate NodeAnnouncement addr deserialization to check addr len.
Matt Corallo [Wed, 25 Jul 2018 19:27:19 +0000 (15:27 -0400)]
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.

5 years agoEnsure all msg deserialization can provide extra bytes, rename err
Matt Corallo [Wed, 25 Jul 2018 19:48:44 +0000 (15:48 -0400)]
Ensure all msg deserialization can provide extra bytes, rename err

5 years agoadd .editorconfig to ensure we use tabs, not spaces
Savil Srivastava [Wed, 25 Jul 2018 19:49:58 +0000 (12:49 -0700)]
add .editorconfig to ensure we use tabs, not spaces

5 years agoMerge pull request #86 from TheBlueMatt/2018-07-event-fixes
Matt Corallo [Wed, 25 Jul 2018 02:59:46 +0000 (22:59 -0400)]
Merge pull request #86 from TheBlueMatt/2018-07-event-fixes

Fix one bug on event handling, clean up docs

5 years agoMake claim_funds_INTERNAL private 2018-07-event-fixes
Matt Corallo [Wed, 25 Jul 2018 02:31:52 +0000 (22:31 -0400)]
Make claim_funds_INTERNAL private

5 years agoDo not pass DisconnectPeer events upstream to the client
Matt Corallo [Wed, 25 Jul 2018 02:08:40 +0000 (22:08 -0400)]
Do not pass DisconnectPeer events upstream to the client

5 years agoPendingHTLCsForwardable really should just be upstreamed.
Matt Corallo [Wed, 25 Jul 2018 02:08:18 +0000 (22:08 -0400)]
PendingHTLCsForwardable really should just be upstreamed.

This is just a comment/docs/function rename change

5 years agoMerge pull request #85 from TheBlueMatt/2018-07-fees
Matt Corallo [Wed, 25 Jul 2018 00:59:49 +0000 (20:59 -0400)]
Merge pull request #85 from TheBlueMatt/2018-07-fees

Convert fee API to per_kw instead of per_vb

5 years agoConvert fee API to per_kw instead of per_vb 2018-07-fees
Matt Corallo [Wed, 25 Jul 2018 00:34:56 +0000 (20:34 -0400)]
Convert fee API to per_kw instead of per_vb

This (a) cuts down a bit on some conversions, reducing chances for
bugsand (b) provides greater accuracy for clients.

5 years agoMerge pull request #82 from TheBlueMatt/2018-07-send-initial
Matt Corallo [Tue, 24 Jul 2018 19:41:38 +0000 (15:41 -0400)]
Merge pull request #82 from TheBlueMatt/2018-07-send-initial

Initial fixes for payment sending

5 years agoFix HTLC exclusion balance calculation criteria 2018-07-send-initial
Matt Corallo [Tue, 24 Jul 2018 19:01:56 +0000 (15:01 -0400)]
Fix HTLC exclusion balance calculation criteria

5 years agoHalf-ass some CLTV fixes for real channel creation
Matt Corallo [Mon, 23 Jul 2018 23:45:59 +0000 (19:45 -0400)]
Half-ass some CLTV fixes for real channel creation

5 years ago[RFC][Tx Sort] Implement sorting of inputs
Savil Srivastava [Mon, 23 Jul 2018 00:03:13 +0000 (17:03 -0700)]
[RFC][Tx Sort] Implement sorting of inputs

Follows BIP69: https://github.com/bitcoin/bips/blob/master/bip-0069.mediawiki

1. Implements sorting of transactoin inputs.
- BIP says to use "reversed byte-order" for the `prev_hash`. I interpreted this as: little-endian.
- TODO need to add tests

2. Re: improve sorting of TxOut's script_pubkey to use lexicographic ordering, and not length.
From the test-cases i've included it seems that the current code already does lexicographic ordering (and not length based). Am i missing something?

5 years agoSet associated_data to payment_hash
Matt Corallo [Mon, 23 Jul 2018 23:44:17 +0000 (19:44 -0400)]
Set associated_data to payment_hash

5 years agoMerge pull request #83 from TheBlueMatt/2018-07-direct-route
Matt Corallo [Tue, 24 Jul 2018 02:46:51 +0000 (22:46 -0400)]
Merge pull request #83 from TheBlueMatt/2018-07-direct-route

Short-circuit router for an outbound specified direct channel

5 years agoShort-circuit router for an outbound specified direct channel 2018-07-direct-route
Matt Corallo [Tue, 24 Jul 2018 01:51:19 +0000 (21:51 -0400)]
Short-circuit router for an outbound specified direct channel

5 years agoMerge pull request #79 from TheBlueMatt/2018-07-chanmon-oom
Matt Corallo [Mon, 23 Jul 2018 19:26:09 +0000 (15:26 -0400)]
Merge pull request #79 from TheBlueMatt/2018-07-chanmon-oom

Fix OOM crash in ChannelMonitor::deserialize found by AFL

5 years agoFix OOM crash in ChannelMonitor::deserialize found by AFL 2018-07-chanmon-oom
Matt Corallo [Mon, 23 Jul 2018 18:53:34 +0000 (14:53 -0400)]
Fix OOM crash in ChannelMonitor::deserialize found by AFL

5 years agoMerge pull request #78 from TheBlueMatt/2018-07-43-rebased
Matt Corallo [Mon, 23 Jul 2018 18:59:24 +0000 (14:59 -0400)]
Merge pull request #78 from TheBlueMatt/2018-07-43-rebased

Add DisconnectPeer event

5 years agoAdd DisconnectPeer events 2018-07-43-rebased
Antoine Riard [Mon, 23 Jul 2018 01:06:45 +0000 (01:06 +0000)]
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

5 years agoImplement ErrorMessage msg and ErrorAction::SendErrorMessage + fuzz test
Antoine Riard [Mon, 23 Jul 2018 00:59:16 +0000 (00:59 +0000)]
Implement ErrorMessage msg and ErrorAction::SendErrorMessage + fuzz test

5 years agoMerge pull request #77 from TheBlueMatt/2018-07-route-tweaks
Matt Corallo [Mon, 23 Jul 2018 17:57:00 +0000 (13:57 -0400)]
Merge pull request #77 from TheBlueMatt/2018-07-route-tweaks

Add arg to get_route to specify our local channels explicitly

5 years agoAdd arg to get_route to specify our local channels explicitly 2018-07-route-tweaks
Matt Corallo [Mon, 23 Jul 2018 17:10:18 +0000 (13:10 -0400)]
Add arg to get_route to specify our local channels explicitly

(and a new getter in ChannelManager to get the thing to pass in)

5 years agoSkip always iterating over all nodes in get_route
Matt Corallo [Mon, 23 Jul 2018 15:17:10 +0000 (11:17 -0400)]
Skip always iterating over all nodes in get_route

5 years agoMerge pull request #76 from TheBlueMatt/2018-07-75-dangling-spaces
Matt Corallo [Mon, 23 Jul 2018 14:36:20 +0000 (10:36 -0400)]
Merge pull request #76 from TheBlueMatt/2018-07-75-dangling-spaces

Remove dangling spaces from #75

5 years agoRemove dangling spaces from #75 2018-07-75-dangling-spaces
Matt Corallo [Mon, 23 Jul 2018 03:54:30 +0000 (23:54 -0400)]
Remove dangling spaces from #75

5 years agoMerge pull request #75 from TheBlueMatt/2018-07-68-rebased
Matt Corallo [Mon, 23 Jul 2018 03:53:08 +0000 (23:53 -0400)]
Merge pull request #75 from TheBlueMatt/2018-07-68-rebased

[msgs::ChannelReestablish] implement encoding and decoding

5 years agoMerge pull request #74 from TheBlueMatt/2018-07-shutdown-event
Matt Corallo [Mon, 23 Jul 2018 03:44:55 +0000 (23:44 -0400)]
Merge pull request #74 from TheBlueMatt/2018-07-shutdown-event

Move shutdown sending to an event

5 years ago[msgs::ChannelReestablish] implement encoding and decoding 2018-07-68-rebased
Savil Srivastava [Sat, 21 Jul 2018 00:24:14 +0000 (17:24 -0700)]
[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
```

5 years agoMerge pull request #69 from savil/gen-target-fix
Matt Corallo [Mon, 23 Jul 2018 03:25:30 +0000 (23:25 -0400)]
Merge pull request #69 from savil/gen-target-fix

[fuzz] remove \L in sed regex for filenames in gen_target.sh

5 years agoMove shutdown sending to an event 2018-07-shutdown-event
Matt Corallo [Mon, 23 Jul 2018 03:03:31 +0000 (23:03 -0400)]
Move shutdown sending to an event

5 years agoMerge pull request #73 from TheBlueMatt/2018-07-no-uint
Matt Corallo [Sun, 22 Jul 2018 23:41:12 +0000 (19:41 -0400)]
Merge pull request #73 from TheBlueMatt/2018-07-no-uint

Migrate all Uint256s used for channel_ids to [u8; 32]

5 years agoMigrate all Uint256s used for channel_ids to [u8; 32] 2018-07-no-uint
Matt Corallo [Sun, 22 Jul 2018 22:19:28 +0000 (18:19 -0400)]
Migrate all Uint256s used for channel_ids to [u8; 32]

5 years agoMerge pull request #71 from TheBlueMatt/2018-07-watch-funding
Matt Corallo [Sun, 22 Jul 2018 21:54:50 +0000 (17:54 -0400)]
Merge pull request #71 from TheBlueMatt/2018-07-watch-funding

 Ensure the funding transaction is registered to be monitored

5 years agoFix failure sending FundingLocked for non-announced channels 2018-07-watch-funding
Matt Corallo [Sun, 22 Jul 2018 20:39:34 +0000 (16:39 -0400)]
Fix failure sending FundingLocked for non-announced channels

5 years agoTest transaction watch registration in channelmonitor tests
Matt Corallo [Sun, 22 Jul 2018 17:58:30 +0000 (13:58 -0400)]
Test transaction watch registration in channelmonitor tests

5 years agoEnsure the funding transaction is registered to be monitored
Matt Corallo [Sun, 22 Jul 2018 17:57:55 +0000 (13:57 -0400)]
Ensure the funding transaction is registered to be monitored

5 years agoMerge pull request #70 from TheBlueMatt/master
Matt Corallo [Sun, 22 Jul 2018 17:39:27 +0000 (13:39 -0400)]
Merge pull request #70 from TheBlueMatt/master

Clarify get_peer_node_ids docs a bit

5 years agoClarify get_peer_node_ids docs a bit
Matt Corallo [Sun, 22 Jul 2018 17:11:58 +0000 (13:11 -0400)]
Clarify get_peer_node_ids docs a bit

5 years agoMerge pull request #67 from yuntai/issue_56
Matt Corallo [Sun, 22 Jul 2018 17:08:49 +0000 (13:08 -0400)]
Merge pull request #67 from yuntai/issue_56

#56 Expose list of pubkeys of connected peers from PeerHandler and addresses-by-pubkey from Router

5 years agoadd two methods for the issue #56
Yuntai Kyong [Fri, 20 Jul 2018 19:04:28 +0000 (04:04 +0900)]
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

5 years ago[fuzz] remove \L in sed regex for filenames in gen_target.sh
Savil Srivastava [Sat, 21 Jul 2018 06:00:31 +0000 (23:00 -0700)]
[fuzz] remove \L in sed regex for filenames in gen_target.sh

Summary:
on `master` branch, if i ran `gen_target.sh` i would get the following output:
https://gist.github.com/savil/2b3114eaf34c3ef8499b65005e374841

Without it, I get the files generated that are already checked-in (as expected).

Looking at the sed docs (https://www.gnu.org/software/sed/manual/html_node/Regular-Expressions.html) i don't see an explanation for what `\L` may do in whatever regex sed follows. Does this look correct? cc @yuntai

5 years agoMerge pull request #65 from TheBlueMatt/master
Matt Corallo [Fri, 20 Jul 2018 03:31:37 +0000 (23:31 -0400)]
Merge pull request #65 from TheBlueMatt/master

Bump version for API overhauls, update deps and docs

5 years agoMerge pull request #53 from savil/rename-error-msg-to-action
Matt Corallo [Fri, 20 Jul 2018 03:30:28 +0000 (23:30 -0400)]
Merge pull request #53 from savil/rename-error-msg-to-action

[HandleError] rename msg field to action

5 years agoBump version for API overhauls, update deps and docs
Matt Corallo [Fri, 20 Jul 2018 02:45:34 +0000 (22:45 -0400)]
Bump version for API overhauls, update deps and docs

5 years agoMerge pull request #47 from ariard/block_disconnected_close_chan
Matt Corallo [Fri, 20 Jul 2018 03:05:22 +0000 (23:05 -0400)]
Merge pull request #47 from ariard/block_disconnected_close_chan

Implement channel closing for block_disconnected on ChainListener + test

5 years agoupdate TODO message for renaming "msg" field of HandleError struct
Savil Srivastava [Fri, 20 Jul 2018 02:54:31 +0000 (19:54 -0700)]
update TODO message for renaming "msg" field of HandleError struct

5 years ago[Error] rename msg field to action
Savil Srivastava [Fri, 20 Jul 2018 00:26:27 +0000 (17:26 -0700)]
[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`

5 years agoMake some more things pub(crate) as they don't need exposed now
Matt Corallo [Fri, 20 Jul 2018 02:54:20 +0000 (22:54 -0400)]
Make some more things pub(crate) as they don't need exposed now

5 years agoMerge pull request #64 from TheBlueMatt/master
Matt Corallo [Fri, 20 Jul 2018 02:44:42 +0000 (22:44 -0400)]
Merge pull request #64 from TheBlueMatt/master

 Expose the script_pubkey being monitored in chain watch (fixes #44)

5 years agoImplement channel closing for block_disconnected on ChainListener + test
Antoine Riard [Sat, 14 Jul 2018 02:08:14 +0000 (02:08 +0000)]
Implement channel closing for block_disconnected on ChainListener + test

5 years agoRemove in-repo TODOs (they're now tracked in GitHub)
Matt Corallo [Fri, 20 Jul 2018 02:06:56 +0000 (22:06 -0400)]
Remove in-repo TODOs (they're now tracked in GitHub)

5 years agoExpose the script_pubkey being monitored in chain watch (fixes #44)
Matt Corallo [Fri, 20 Jul 2018 02:06:07 +0000 (22:06 -0400)]
Expose the script_pubkey being monitored in chain watch (fixes #44)

5 years agoMerge pull request #52 from TheBlueMatt/master
Matt Corallo [Thu, 19 Jul 2018 21:48:58 +0000 (17:48 -0400)]
Merge pull request #52 from TheBlueMatt/master

Fix various spec bugs, can now open channels with real nodes!

5 years agoFix various spec bugs, can now open channels with real nodes!
Matt Corallo [Thu, 19 Jul 2018 21:17:06 +0000 (17:17 -0400)]
Fix various spec bugs, can now open channels with real nodes!

 * commitment transaction number, as used in locktime/sequence
   fields is actually different from commitment transaction number,
   as used for revocation state. This is confusing and never stated
   in the spec, so we have to do the conversion.
 * max_htlc_value_in_flight is never constrained in the spec, but
   we were requiring it be <= channel size. Instead just clamp the
   values the peer sends us when storing.
 * channel_id calculation was incorrect, we now do some crazy
   conversion hops, which we shouldn't, but will need to change our
   types to fix.
 * Our channel_reserve_satoshis value was too low, just change the
   constant and leave the TODO to figure out what it really should
   be for now.

5 years agoMerge pull request #49 from ariard/bad_failure_codes
Matt Corallo [Wed, 18 Jul 2018 20:55:06 +0000 (16:55 -0400)]
Merge pull request #49 from ariard/bad_failure_codes

Erroneous failure codes, replace PERM|7 by UPDATE|7

5 years agoMerge pull request #51 from TheBlueMatt/master
Matt Corallo [Wed, 18 Jul 2018 19:00:49 +0000 (15:00 -0400)]
Merge pull request #51 from TheBlueMatt/master

Shorten channelmonitor_deserialize_target's name for AFL

5 years agoShorten channelmonitor_deserialize_target's name for AFL
Matt Corallo [Wed, 18 Jul 2018 18:36:24 +0000 (14:36 -0400)]
Shorten channelmonitor_deserialize_target's name for AFL

5 years agoMerge pull request #50 from TheBlueMatt/master
Matt Corallo [Wed, 18 Jul 2018 18:30:00 +0000 (14:30 -0400)]
Merge pull request #50 from TheBlueMatt/master

Fix channelmonitor fuzz test failure

5 years agoFix channelmonitor fuzz test failure
Matt Corallo [Wed, 18 Jul 2018 17:36:00 +0000 (13:36 -0400)]
Fix channelmonitor fuzz test failure

5 years agoMerge pull request #48 from TheBlueMatt/2018-07-monitor-serialize
Matt Corallo [Wed, 18 Jul 2018 13:53:15 +0000 (06:53 -0700)]
Merge pull request #48 from TheBlueMatt/2018-07-monitor-serialize

 Implement channelmonitor (de)serialization

5 years agoErroneous failure codes, replace PERM|7 by UPDATE|7
Antoine Riard [Wed, 18 Jul 2018 00:59:52 +0000 (00:59 +0000)]
Erroneous failure codes, replace PERM|7 by UPDATE|7

5 years agoTest channelmonitor serialization roundtrip doesn't mutate state 2018-07-monitor-serialize
Matt Corallo [Tue, 17 Jul 2018 04:12:54 +0000 (21:12 -0700)]
Test channelmonitor serialization roundtrip doesn't mutate state

5 years agoImplement channelmonitor (de)serialization (fixes #45)
Matt Corallo [Mon, 9 Jul 2018 20:40:21 +0000 (16:40 -0400)]
Implement channelmonitor (de)serialization (fixes #45)

5 years agoClarify ChannelMonitor remote commitment tracking and fix a race
Matt Corallo [Sun, 8 Jul 2018 20:31:48 +0000 (16:31 -0400)]
Clarify ChannelMonitor remote commitment tracking and fix a race

5 years agoMove channelmonitor-update functions to pub(ln) from pub
Matt Corallo [Sat, 7 Jul 2018 20:51:20 +0000 (16:51 -0400)]
Move channelmonitor-update functions to pub(ln) from pub

5 years agoUpdate TODOs in README
Matt Corallo [Sat, 7 Jul 2018 20:51:05 +0000 (16:51 -0400)]
Update TODOs in README

5 years agoMerge pull request #46 from ariard/useless_todo_channelmanager
Matt Corallo [Sat, 14 Jul 2018 04:30:22 +0000 (21:30 -0700)]
Merge pull request #46 from ariard/useless_todo_channelmanager

TODO already cleaned by #16

5 years agoTODO already cleaned by #16
Antoine Riard [Fri, 13 Jul 2018 02:49:06 +0000 (02:49 +0000)]
TODO already cleaned by #16

5 years agoMerge pull request #41 from TheBlueMatt/master
Matt Corallo [Fri, 6 Jul 2018 21:54:01 +0000 (17:54 -0400)]
Merge pull request #41 from TheBlueMatt/master

Move open_channel message handling into an event

5 years agoMove open_channel message handling into an event
Matt Corallo [Fri, 6 Jul 2018 21:29:34 +0000 (17:29 -0400)]
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.

5 years agoMerge pull request #39 from TheBlueMatt/master
Matt Corallo [Thu, 5 Jul 2018 03:17:44 +0000 (23:17 -0400)]
Merge pull request #39 from TheBlueMatt/master

Add warning about aut-close()-fd-races for peer_handler impls

5 years agoAdd warning about aut-close()-fd-races for peer_handler impls
Matt Corallo [Tue, 3 Jul 2018 00:07:37 +0000 (20:07 -0400)]
Add warning about aut-close()-fd-races for peer_handler impls

5 years agoMerge pull request #38 from jeandudey/max-funding-satoshis
Matt Corallo [Sat, 30 Jun 2018 20:54:13 +0000 (16:54 -0400)]
Merge pull request #38 from jeandudey/max-funding-satoshis

Add `MAX_FUNDING_SATOSHIS` constant.

5 years agoAdd `MAX_FUNDING_SATOSHIS` constant.
Jean Pierre Dudey [Sat, 30 Jun 2018 14:32:23 +0000 (10:32 -0400)]
Add `MAX_FUNDING_SATOSHIS` constant.

This constants defines the maximum value of `open_channel.funding_satoshis`,
currently it's defined to be 2^24 according to the BOLT #2 specification.
Also a test was added to check that the constant is never over 2,1x10^15
(maximum satoshis in bitcoin) if modified.

Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com>
5 years agoMerge pull request #37 from TheBlueMatt/master
Matt Corallo [Fri, 29 Jun 2018 22:26:41 +0000 (18:26 -0400)]
Merge pull request #37 from TheBlueMatt/master

Fix additional 1.22 rustc warning

5 years agoMerge pull request #36 from TheBlueMatt/2018-08-33-cleanups
Matt Corallo [Fri, 29 Jun 2018 22:26:25 +0000 (18:26 -0400)]
Merge pull request #36 from TheBlueMatt/2018-08-33-cleanups

Cleanups after #33, plus one unrelated bugfix spotted in #33 review

5 years agoFix additional 1.22 rustc warning
Matt Corallo [Fri, 29 Jun 2018 21:44:33 +0000 (17:44 -0400)]
Fix additional 1.22 rustc warning

5 years agoAdd more docs to transaction::OutPoint 2018-08-33-cleanups
Matt Corallo [Fri, 29 Jun 2018 21:38:05 +0000 (17:38 -0400)]
Add more docs to transaction::OutPoint

5 years agoCleanups after #33, plus one unrelated bugfix spotted in #33 review
Matt Corallo [Fri, 29 Jun 2018 21:23:50 +0000 (17:23 -0400)]
Cleanups after #33, plus one unrelated bugfix spotted in #33 review

5 years agoMerge pull request #35 from TheBlueMatt/2018-06-post-32
Matt Corallo [Fri, 29 Jun 2018 21:23:43 +0000 (17:23 -0400)]
Merge pull request #35 from TheBlueMatt/2018-06-post-32

Some cleanups after #32

5 years agoMerge pull request #33 from jeandudey/funding_txo
Matt Corallo [Fri, 29 Jun 2018 21:23:34 +0000 (17:23 -0400)]
Merge pull request #33 from jeandudey/funding_txo

Use the `TxOutRef` type for the `ChannelMonitor`'s funding_txo field.