]> git.bitcoin.ninja Git - rust-lightning/log
rust-lightning
6 years agoMerge pull request #116 from TheBlueMatt/2018-08-peer_handler-trace
Matt Corallo [Fri, 17 Aug 2018 03:35:09 +0000 (23:35 -0400)]
Merge pull request #116 from TheBlueMatt/2018-08-peer_handler-trace

Add some trace logging in peer_handler

6 years agoAdd some trace logging in peer_handler 2018-08-peer_handler-trace
Matt Corallo [Fri, 17 Aug 2018 02:38:49 +0000 (22:38 -0400)]
Add some trace logging in peer_handler

6 years agoDefault test logger to Trace to make error debugging easier
Matt Corallo [Fri, 17 Aug 2018 02:30:18 +0000 (22:30 -0400)]
Default test logger to Trace to make error debugging easier

6 years agoAdd some useful delayed-formatting formatters to macro_logger
Matt Corallo [Fri, 17 Aug 2018 02:30:03 +0000 (22:30 -0400)]
Add some useful delayed-formatting formatters to macro_logger

6 years agoRemove some dead Logger code
Matt Corallo [Fri, 17 Aug 2018 01:25:56 +0000 (21:25 -0400)]
Remove some dead Logger code

6 years agoMerge pull request #115 from TheBlueMatt/2018-08-channel-fuzz-fixes
Matt Corallo [Fri, 17 Aug 2018 03:04:12 +0000 (23:04 -0400)]
Merge pull request #115 from TheBlueMatt/2018-08-channel-fuzz-fixes

Fixes from channelmanager fuzzing work

6 years agoFix PaymentReceived/sha256 handling in full_stack_target 2018-08-channel-fuzz-fixes
Matt Corallo [Thu, 16 Aug 2018 14:31:10 +0000 (10:31 -0400)]
Fix PaymentReceived/sha256 handling in full_stack_target

Sha256 in fuzztarget was updated some time ago to use XOR instead
of the first byte of a real SHA256 run and somehow received and
sent payments got crossed in full_stack_target.

6 years agoHandle duplicate funding transaction gracefully.
Matt Corallo [Wed, 15 Aug 2018 19:43:29 +0000 (15:43 -0400)]
Handle duplicate funding transaction gracefully.

This can otherwise cause strange behavior, including a panic on
force_close_all_channels found by full_stack_target fuzzing.

6 years agoFix handle_funding_created bug/TODO
Matt Corallo [Thu, 16 Aug 2018 15:27:16 +0000 (11:27 -0400)]
Fix handle_funding_created bug/TODO

The fuzzer was able to tickle this

6 years agoFix bug in early-HTLC-fulfill handling
Matt Corallo [Tue, 14 Aug 2018 20:29:00 +0000 (16:29 -0400)]
Fix bug in early-HTLC-fulfill handling

Caught by fuzzer. See new comments for more

6 years agoMerge pull request #110 from TheBlueMatt/2018-08-router-crashes-2
Matt Corallo [Fri, 17 Aug 2018 02:07:47 +0000 (22:07 -0400)]
Merge pull request #110 from TheBlueMatt/2018-08-router-crashes-2

Fix several fuzzer-found bugs

6 years ago[Router] Remove channels from nodes when the channel is failed 2018-08-router-crashes-2
Matt Corallo [Thu, 16 Aug 2018 14:17:33 +0000 (10:17 -0400)]
[Router] Remove channels from nodes when the channel is failed

Found by fuzzer

6 years agoHandle only-path-overflows-fee in get_route and avoid PubKey::new()
Matt Corallo [Wed, 15 Aug 2018 21:13:34 +0000 (17:13 -0400)]
Handle only-path-overflows-fee in get_route and avoid PubKey::new()

Found by fuzzer

6 years agoFix fee_base_msat overflowing entire fee range in RouteHint
Matt Corallo [Wed, 15 Aug 2018 19:50:14 +0000 (15:50 -0400)]
Fix fee_base_msat overflowing entire fee range in RouteHint

6 years agoErr from get_route if the requested value is more than 21m BTC
Matt Corallo [Tue, 14 Aug 2018 20:40:40 +0000 (16:40 -0400)]
Err from get_route if the requested value is more than 21m BTC

This fixes a potential overflow panic.

6 years agoCorrect lowest_inbound_proportional_fee deduction in route finding
Matt Corallo [Tue, 14 Aug 2018 19:56:58 +0000 (15:56 -0400)]
Correct lowest_inbound_proportional_fee deduction in route finding

Found cause fuzzer was able to crash us if we don't

6 years agoFix multiply-with-overflow panic in router
Matt Corallo [Tue, 14 Aug 2018 14:34:20 +0000 (10:34 -0400)]
Fix multiply-with-overflow panic in router

Found by fuzzer

6 years agoMerge pull request #91 from ariard/logging_interface
Matt Corallo [Fri, 17 Aug 2018 00:24:49 +0000 (20:24 -0400)]
Merge pull request #91 from ariard/logging_interface

Logging interface

6 years agoLogging interface
Antoine Riard [Wed, 25 Jul 2018 02:34:51 +0000 (02:34 +0000)]
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

6 years agoMerge pull request #107 from ariard/event_handle_error
Matt Corallo [Thu, 16 Aug 2018 20:26:00 +0000 (16:26 -0400)]
Merge pull request #107 from ariard/event_handle_error

Implement HandleError event with ErrorAction field

6 years agoImplement HandleError event with ErrorAction field
Antoine Riard [Wed, 1 Aug 2018 16:34:03 +0000 (16:34 +0000)]
Implement HandleError event with ErrorAction field

6 years agoMerge pull request #108 from TheBlueMatt/2018-08-fuzz-fixes
Matt Corallo [Mon, 6 Aug 2018 03:04:18 +0000 (23:04 -0400)]
Merge pull request #108 from TheBlueMatt/2018-08-fuzz-fixes

Asorted Fixes from full_stack_target work

6 years agoFix UpdateAddHTLC serialize vec capacity default 2018-08-fuzz-fixes
Matt Corallo [Fri, 3 Aug 2018 02:21:06 +0000 (22:21 -0400)]
Fix UpdateAddHTLC serialize vec capacity default

6 years agoStub out ChaCha20 non-HMAC encryption/decryption in fuzztarget
Matt Corallo [Fri, 3 Aug 2018 00:05:14 +0000 (20:05 -0400)]
Stub out ChaCha20 non-HMAC encryption/decryption in fuzztarget

6 years agoFix fuzztarget insert_combine hash-collision panic
Matt Corallo [Thu, 2 Aug 2018 10:32:11 +0000 (06:32 -0400)]
Fix fuzztarget insert_combine hash-collision panic

6 years agoFix panic on reorg through the funding_locked-generating block
Matt Corallo [Thu, 2 Aug 2018 10:23:53 +0000 (06:23 -0400)]
Fix panic on reorg through the funding_locked-generating block

We had a TODO to handle "lost confirmation" in block_connected,
which we recently did in block_disconnected (calling force_shutdown
in case we get too many blocks disconnected) but didn't handle the
case where we had a simple reorg through the block that resulted in
us generating a funding_locked.

6 years agoFix fuzztarget ChannelKeys generation
Matt Corallo [Wed, 1 Aug 2018 20:37:58 +0000 (16:37 -0400)]
Fix fuzztarget ChannelKeys generation

6 years agoFix types in Channel::funding_tx_confirmed_in
Matt Corallo [Wed, 1 Aug 2018 20:13:04 +0000 (16:13 -0400)]
Fix types in Channel::funding_tx_confirmed_in

This should have no effect in a real system but was causing the
full_stack_target fuzz test to fail due to a block with a null hash
being disconnected.

6 years agoFix panic!() in block_connected on unfunded channels (fixes #42)
Matt Corallo [Wed, 1 Aug 2018 03:48:54 +0000 (23:48 -0400)]
Fix panic!() in block_connected on unfunded channels (fixes #42)

The new full_stack_target fuzzing stuff was able to find this bug,
which gives me a bit of hope for full_stack_target's utility.

6 years agoMerge pull request #100 from TheBlueMatt/2018-07-htlc-balance-calc
Matt Corallo [Tue, 31 Jul 2018 04:59:31 +0000 (00:59 -0400)]
Merge pull request #100 from TheBlueMatt/2018-07-htlc-balance-calc

Fix non-HTLC-inclusion balance calculation (mark II)

6 years agoMerge pull request #102 from savil/hex-version
Matt Corallo [Tue, 31 Jul 2018 01:50:19 +0000 (21:50 -0400)]
Merge pull request #102 from savil/hex-version

change hex version to 0.3, and leave out the minor bumps

6 years agochange hex version to 0.3, and leave out the minor bumps
Savil Srivastava [Tue, 31 Jul 2018 00:01:57 +0000 (17:01 -0700)]
change hex version to 0.3, and leave out the minor bumps

6 years agoFix non-HTLC-inclusion balance calculation (mark II) 2018-07-htlc-balance-calc
Matt Corallo [Mon, 30 Jul 2018 22:05:50 +0000 (18:05 -0400)]
Fix non-HTLC-inclusion balance calculation (mark II)

6 years agoMerge pull request #98 from TheBlueMatt/2018-07-invalid-funding
Matt Corallo [Sun, 29 Jul 2018 18:25:18 +0000 (14:25 -0400)]
Merge pull request #98 from TheBlueMatt/2018-07-invalid-funding

Handle invalid funding tx in channelmanager

6 years agoMerge pull request #97 from TheBlueMatt/2018-07-no-useless-preimages
Matt Corallo [Sun, 29 Jul 2018 18:01:14 +0000 (14:01 -0400)]
Merge pull request #97 from TheBlueMatt/2018-07-no-useless-preimages

Stop adding remote's payment_preimages to our channel monitor

6 years agoMerge pull request #96 from TheBlueMatt/2018-07-force-close-handling
Matt Corallo [Sun, 29 Jul 2018 17:39:17 +0000 (13:39 -0400)]
Merge pull request #96 from TheBlueMatt/2018-07-force-close-handling

Add pending-HTLC-failure to and unify force_shutdown() handling

6 years agoHandle invalid funding tx in channelmanager 2018-07-invalid-funding
Matt Corallo [Sun, 29 Jul 2018 05:59:42 +0000 (01:59 -0400)]
Handle invalid funding tx in channelmanager

6 years agoStop adding remote's payment_preimages to our channel monitor 2018-07-no-useless-preimages
Matt Corallo [Sat, 28 Jul 2018 22:32:58 +0000 (18:32 -0400)]
Stop adding remote's payment_preimages to our channel monitor

6 years agoSome match -> if let replacement
Matt Corallo [Sat, 28 Jul 2018 21:39:33 +0000 (17:39 -0400)]
Some match -> if let replacement

6 years agoAssert usize is 32 or 64 bits, as required in a TODO
Matt Corallo [Sat, 28 Jul 2018 21:39:10 +0000 (17:39 -0400)]
Assert usize is 32 or 64 bits, as required in a TODO

6 years agoRemove some excess mut's 1.22 complains about
Matt Corallo [Sun, 29 Jul 2018 17:29:36 +0000 (13:29 -0400)]
Remove some excess mut's 1.22 complains about

6 years agoAdd pending-HTLC-failure to and unify force_shutdown() handling 2018-07-force-close-handling
Matt Corallo [Sat, 28 Jul 2018 23:15:45 +0000 (19:15 -0400)]
Add pending-HTLC-failure to and unify force_shutdown() handling

This patch got a bit bigger than I'd intended, but primarily this
unifies force_shutdown() handling so all the callsites at least
look similar. It also fails backwards any HTLCs which were
completely pending (ie hadn't been committed to) and ensures we
broadcast our local commitment transaction. It also adds a
force_close_channel method to ChannelManager to expose
force-closure.

6 years agoRemove some useless Vecs
Matt Corallo [Sat, 28 Jul 2018 23:15:20 +0000 (19:15 -0400)]
Remove some useless Vecs

6 years agoClean up forward_/claimable_htlcs handling and document consistency
Matt Corallo [Sat, 28 Jul 2018 22:32:43 +0000 (18:32 -0400)]
Clean up forward_/claimable_htlcs handling and document consistency

6 years agoFix force_shutdown() bug where we lose knowledge of a preimage
Matt Corallo [Thu, 26 Jul 2018 21:53:10 +0000 (17:53 -0400)]
Fix force_shutdown() bug where we lose knowledge of a preimage

In case we are in AwaitingRemoteRevoke and we go to claim an HTLC
(at which point we've already given up the money to the next hop in
the payment) we just write it to holding_cell_htlc_updates.
However, we should be ensuring we *also* write it to our
channel_monitor as we need to make sure we can still claim it after
a force_shutdown() or otherwise after hitting the chain.

6 years agoMerge pull request #95 from savil/rm-bitcoin-util-hexbytes
Matt Corallo [Sat, 28 Jul 2018 20:19:33 +0000 (16:19 -0400)]
Merge pull request #95 from savil/rm-bitcoin-util-hexbytes

replace use of bitcoin::utils::misc::hex_bytes with hex::decode

6 years agouse hex::decode instead of extend_vec_from_hex
Savil Srivastava [Sat, 28 Jul 2018 16:44:15 +0000 (09:44 -0700)]
use hex::decode instead of extend_vec_from_hex

6 years agoreplace use of bitcoin::utils::misc::hex_bytes with hex::decode
Savil Srivastava [Sat, 28 Jul 2018 00:06:14 +0000 (17:06 -0700)]
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

6 years agoMerge pull request #94 from TheBlueMatt/2018-07-duplicate_hash
Matt Corallo [Fri, 27 Jul 2018 16:24:14 +0000 (12:24 -0400)]
Merge pull request #94 from TheBlueMatt/2018-07-duplicate_hash

Handle duplicate payment_hash send_payment()s

6 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.

6 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

6 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

6 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.

6 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

6 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

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

6 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

6 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

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

6 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

6 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

6 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

6 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

6 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

6 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

6 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

6 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

6 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.

6 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

6 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

6 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

6 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

6 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

6 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

6 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

6 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.

6 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

6 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

6 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

6 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?

6 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

6 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

6 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

6 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

6 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

6 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

6 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

6 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

6 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

6 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)

6 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

6 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

6 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

6 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

6 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

6 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
```

6 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

6 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

6 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]

6 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]