]> git.bitcoin.ninja Git - rust-lightning/log
rust-lightning
6 years agoadd a ChannelUnavailable error
Yuntai Kyong [Thu, 27 Sep 2018 03:58:05 +0000 (12:58 +0900)]
add a ChannelUnavailable error

6 years agoraise APIError from close_channel
Yuntai Kyong [Tue, 25 Sep 2018 15:32:30 +0000 (00:32 +0900)]
raise APIError from close_channel

6 years agoMerge pull request #201 from TheBlueMatt/2018-09-channelerror-1
Matt Corallo [Mon, 1 Oct 2018 14:32:00 +0000 (10:32 -0400)]
Merge pull request #201 from TheBlueMatt/2018-09-channelerror-1

Introduce a Channel-specific Err type and return it in a few places

6 years agoUse new ChannelError in get_channel_announcement 2018-09-channelerror-1
Matt Corallo [Mon, 1 Oct 2018 00:03:35 +0000 (20:03 -0400)]
Use new ChannelError in get_channel_announcement

6 years agoUse new ChannelError in channel_reestablish handling
Matt Corallo [Sun, 30 Sep 2018 23:51:15 +0000 (19:51 -0400)]
Use new ChannelError in channel_reestablish handling

6 years agoUse new ChannelError in HTLC-removal msgs, filling out more handling
Matt Corallo [Sun, 30 Sep 2018 23:33:03 +0000 (19:33 -0400)]
Use new ChannelError in HTLC-removal msgs, filling out more handling

6 years agoUse new ChannelError in funding_locked, filling out more handling
Matt Corallo [Sun, 30 Sep 2018 23:11:01 +0000 (19:11 -0400)]
Use new ChannelError in funding_locked, filling out more handling

6 years agoUse new ChannelError type in accept_channel
Matt Corallo [Sun, 30 Sep 2018 23:08:24 +0000 (19:08 -0400)]
Use new ChannelError type in accept_channel

6 years agoIntroduce a Channel-specific Err type and return it in a few places
Matt Corallo [Sun, 30 Sep 2018 22:19:59 +0000 (18:19 -0400)]
Introduce a Channel-specific Err type and return it in a few places

This is way simpler than writing out the whole ErrorAction mess and
we can just convert it as appropriate in ChannelManager.

6 years agoMerge pull request #199 from TheBlueMatt/2018-09-184-fixed-monitor
Matt Corallo [Sun, 30 Sep 2018 01:09:50 +0000 (21:09 -0400)]
Merge pull request #199 from TheBlueMatt/2018-09-184-fixed-monitor

Fix simple to_local revoked output claim and rebase #184

6 years agoMerge pull request #200 from TheBlueMatt/2018-09-187-tweaks
Matt Corallo [Sun, 30 Sep 2018 00:43:14 +0000 (20:43 -0400)]
Merge pull request #200 from TheBlueMatt/2018-09-187-tweaks

#187 rebased + squashed

6 years agoMacro-out checking a tx validly spends another (and add one more) 2018-09-184-fixed-monitor
Matt Corallo [Sun, 30 Sep 2018 00:24:30 +0000 (20:24 -0400)]
Macro-out checking a tx validly spends another (and add one more)

6 years agoTest htlc outputs single tx claim due to timeout case
Antoine Riard [Sat, 29 Sep 2018 18:51:45 +0000 (14:51 -0400)]
Test htlc outputs single tx claim due to timeout case

6 years agoTest htlc outputs shared tx claim case
Antoine Riard [Thu, 20 Sep 2018 00:52:02 +0000 (00:52 +0000)]
Test htlc outputs shared tx claim case

6 years agoFix and test simple remote-revoked-commitment-output claiming
Matt Corallo [Sat, 29 Sep 2018 18:26:12 +0000 (14:26 -0400)]
Fix and test simple remote-revoked-commitment-output claiming

6 years agoAdd 2-inbound-in-flight update_fee test (that we wouldn't generate) 2018-09-187-tweaks
Matt Corallo [Thu, 27 Sep 2018 21:46:08 +0000 (17:46 -0400)]
Add 2-inbound-in-flight update_fee test (that we wouldn't generate)

6 years agoAnnotate test_update_fee to make events more clear
Matt Corallo [Thu, 27 Sep 2018 21:45:04 +0000 (17:45 -0400)]
Annotate test_update_fee to make events more clear

6 years agoAdd test for out-of-order update_fee commitment_signed/RAA
Matt Corallo [Thu, 27 Sep 2018 01:38:48 +0000 (21:38 -0400)]
Add test for out-of-order update_fee commitment_signed/RAA

6 years agoAdd test for send_commitment pending non-committed feerate updates
Matt Corallo [Thu, 27 Sep 2018 00:04:56 +0000 (20:04 -0400)]
Add test for send_commitment pending non-committed feerate updates

6 years agoNote that update_fee is likely not gonna be our final API
Matt Corallo [Fri, 28 Sep 2018 23:06:41 +0000 (19:06 -0400)]
Note that update_fee is likely not gonna be our final API

6 years agoAdd update_fee tests
Yuntai Kyong [Wed, 26 Sep 2018 23:56:13 +0000 (19:56 -0400)]
Add update_fee tests

6 years agoExpose updating fee on an individual channel
Yuntai Kyong [Wed, 26 Sep 2018 23:55:47 +0000 (19:55 -0400)]
Expose updating fee on an individual channel

6 years agoImplement update_fee handling
Yuntai Kyong [Wed, 26 Sep 2018 23:54:28 +0000 (19:54 -0400)]
Implement update_fee handling

6 years agoMacro out one-monitor-added check in network tests (thanks @yuntai)
Matt Corallo [Wed, 26 Sep 2018 19:28:20 +0000 (15:28 -0400)]
Macro out one-monitor-added check in network tests (thanks @yuntai)

Originally suggested by Yuntai Kyong <yuntai.kyong@gmail.com> in
some new tests.

6 years agoMacro out getting payment_preimage/hash in network tests
Matt Corallo [Wed, 26 Sep 2018 23:50:39 +0000 (19:50 -0400)]
Macro out getting payment_preimage/hash in network tests

6 years agoMerge pull request #197 from TheBlueMatt/master
Matt Corallo [Sat, 29 Sep 2018 18:27:01 +0000 (14:27 -0400)]
Merge pull request #197 from TheBlueMatt/master

Fix fuzztarget failures

6 years agoAvoid double-panic in ChannelManager when tests fail
Matt Corallo [Thu, 27 Sep 2018 21:36:10 +0000 (17:36 -0400)]
Avoid double-panic in ChannelManager when tests fail

6 years agoHandle temporary_channel_id collision in fuzztarget mode
Matt Corallo [Wed, 26 Sep 2018 15:02:38 +0000 (11:02 -0400)]
Handle temporary_channel_id collision in fuzztarget mode

6 years agoNarrow check_spend_remote_htlc input/output count check.
Matt Corallo [Wed, 26 Sep 2018 14:48:30 +0000 (10:48 -0400)]
Narrow check_spend_remote_htlc input/output count check.

This fixes a crash found by fuzztester where a 0-output tx causes a
[] panic (though this shouldn't happen in the real-world as
0-output txn should never be able to be mined).

6 years agoMerge pull request #193 from SWvheerden/Bolt2-specs-errors-of-closing-messages-
Matt Corallo [Fri, 21 Sep 2018 08:59:37 +0000 (04:59 -0400)]
Merge pull request #193 from SWvheerden/Bolt2-specs-errors-of-closing-messages-

Added test for testing sciptpubkey of closing message per bolt 2 spec

6 years agoMerge pull request #194 from TheBlueMatt/2018-09-doc-cleanup
Matt Corallo [Fri, 21 Sep 2018 08:42:57 +0000 (04:42 -0400)]
Merge pull request #194 from TheBlueMatt/2018-09-doc-cleanup

Make docs look nicer by adding explicit spacing

6 years agoAdded test for testing sciptpubkey of closing message per bolt 2 spec
Schalk van Heerden [Thu, 20 Sep 2018 08:16:20 +0000 (10:16 +0200)]
Added test for testing sciptpubkey of closing message per bolt 2 spec

6 years agoMake docs look nicer by adding explicit spacing 2018-09-doc-cleanup
Matt Corallo [Thu, 20 Sep 2018 16:57:47 +0000 (12:57 -0400)]
Make docs look nicer by adding explicit spacing

6 years agoMerge pull request #191 from TheBlueMatt/2018-09-chanmon-ser-framework
Matt Corallo [Thu, 20 Sep 2018 16:14:59 +0000 (12:14 -0400)]
Merge pull request #191 from TheBlueMatt/2018-09-chanmon-ser-framework

Migrate ChannelMonitor writing/reading to new serialization framework

6 years agoBump version to 0.0.5 to get new docs out 2018-09-chanmon-ser-framework
Matt Corallo [Thu, 20 Sep 2018 14:55:34 +0000 (10:55 -0400)]
Bump version to 0.0.5 to get new docs out

6 years agoSwitch to -O1 in dev as we have long-running tests and O1 is cheap
Matt Corallo [Tue, 18 Sep 2018 20:22:53 +0000 (16:22 -0400)]
Switch to -O1 in dev as we have long-running tests and O1 is cheap

6 years agoMigrate ChannelMonitor serialization to new ser framework(ish)
Matt Corallo [Wed, 19 Sep 2018 17:31:14 +0000 (13:31 -0400)]
Migrate ChannelMonitor serialization to new ser framework(ish)

Sadly we can't straight up use the new serialization framework as
we have a few different serialization variants, but that's OK, it
looks identical and is just missing the Writeable impl

6 years agoMove ChannelMonitor deserialization to new ser framework
Matt Corallo [Wed, 19 Sep 2018 17:17:16 +0000 (13:17 -0400)]
Move ChannelMonitor deserialization to new ser framework

6 years agoSimplify DecodeError enum by removing some useless distinctions
Matt Corallo [Wed, 19 Sep 2018 17:06:35 +0000 (13:06 -0400)]
Simplify DecodeError enum by removing some useless distinctions

6 years agoMerge pull request #192 from TheBlueMatt/2018-09-docs-docs-docs
Matt Corallo [Thu, 20 Sep 2018 14:44:23 +0000 (10:44 -0400)]
Merge pull request #192 from TheBlueMatt/2018-09-docs-docs-docs

Add module and all-pub-things docs and deny missing docs

6 years agoAdd module and all-pub-things docs and deny missing docs 2018-09-docs-docs-docs
Matt Corallo [Wed, 19 Sep 2018 21:39:43 +0000 (17:39 -0400)]
Add module and all-pub-things docs and deny missing docs

6 years agoDocument ConfirmationTarget a little bit (closes #101)
Matt Corallo [Wed, 19 Sep 2018 19:01:26 +0000 (15:01 -0400)]
Document ConfirmationTarget a little bit (closes #101)

6 years agoDocument all the fields in Errors
Matt Corallo [Wed, 19 Sep 2018 17:55:14 +0000 (13:55 -0400)]
Document all the fields in Errors

6 years agoMake message fields pub(crate) and hide a few internal fns
Matt Corallo [Wed, 19 Sep 2018 21:37:51 +0000 (17:37 -0400)]
Make message fields pub(crate) and hide a few internal fns

6 years agoLog peer features in peer_handler (and check for all req bits)
Matt Corallo [Wed, 19 Sep 2018 21:33:05 +0000 (17:33 -0400)]
Log peer features in peer_handler (and check for all req bits)

6 years agoRemove fuzz channel_target.
Matt Corallo [Thu, 20 Sep 2018 02:47:07 +0000 (22:47 -0400)]
Remove fuzz channel_target.

It has bitrotted a lot and doesn't really make sense given all the
precondition enforcement that is in channelmanager, sadly.

6 years agoMerge pull request #186 from TheBlueMatt/2018-09-ser-rework-2
Matt Corallo [Tue, 18 Sep 2018 20:14:49 +0000 (16:14 -0400)]
Merge pull request #186 from TheBlueMatt/2018-09-ser-rework-2

Drop old serialization framework

6 years agoMerge pull request #185 from TheBlueMatt/2018-09-ser-rework
Matt Corallo [Tue, 18 Sep 2018 20:14:40 +0000 (16:14 -0400)]
Merge pull request #185 from TheBlueMatt/2018-09-ser-rework

Serialization Framework Tweaks

6 years agoDrop MsgEncodable in favor of default fns on Writeable 2018-09-ser-rework-2
Matt Corallo [Sun, 16 Sep 2018 18:03:36 +0000 (14:03 -0400)]
Drop MsgEncodable in favor of default fns on Writeable

6 years agoFix peer_handler message serialization 2018-09-ser-rework
Matt Corallo [Sun, 16 Sep 2018 17:16:43 +0000 (13:16 -0400)]
Fix peer_handler message serialization

Fixes a bug introduced in 3e89106163b941aa4dc4ff92bdb484b7bbcf50c4
where messages were being encoded with their size instead of their
type.
Also utilizes the new size_hinting in peer_handler

6 years agoMake Writeable::write typed instead of Writeable
Matt Corallo [Sun, 16 Sep 2018 18:02:58 +0000 (14:02 -0400)]
Make Writeable::write typed instead of Writeable

This lets us add some untyped default functions to the trait

6 years agoUtilize Writer size hinting in message fuzz targets and check them
Matt Corallo [Fri, 14 Sep 2018 22:05:13 +0000 (18:05 -0400)]
Utilize Writer size hinting in message fuzz targets and check them

6 years agoStop checking size > 64KB in serialization
Matt Corallo [Sun, 16 Sep 2018 17:50:42 +0000 (13:50 -0400)]
Stop checking size > 64KB in serialization

This removes a bunch of potentially new error handling in writers
and the checks were kinda useless anyway - in normal operation we
unwrap()ed anyway, and we're gonna want to use the serializtion
framework for ChannelMonitor/ChannelManager serialization, which
may generate things larger than 64KB anyway.

6 years agoAdd size_hint in ser and call size_hint in all message serializers
Matt Corallo [Fri, 14 Sep 2018 21:54:59 +0000 (17:54 -0400)]
Add size_hint in ser and call size_hint in all message serializers

6 years agoRemove MsgDecodable and most MsgEncodable impls
Matt Corallo [Sun, 16 Sep 2018 17:39:39 +0000 (13:39 -0400)]
Remove MsgDecodable and most MsgEncodable impls

6 years agoSplit out Vec<u8> and Vec<Signature> ser impls cause there's 2
Matt Corallo [Sun, 16 Sep 2018 02:06:13 +0000 (22:06 -0400)]
Split out Vec<u8> and Vec<Signature> ser impls cause there's 2

Should resolve any performance issues with Vec<u8> serialization.

6 years agoRemove uses of MsgDecodable from ChannelManager
Matt Corallo [Sun, 16 Sep 2018 17:37:35 +0000 (13:37 -0400)]
Remove uses of MsgDecodable from ChannelManager

6 years agoSimplify serialization a bit by removing the useless newtypes
Matt Corallo [Fri, 14 Sep 2018 21:50:48 +0000 (17:50 -0400)]
Simplify serialization a bit by removing the useless newtypes

6 years agoExpose (de)serialziers as we'll need them and I don't like warnings
Matt Corallo [Fri, 14 Sep 2018 20:43:47 +0000 (16:43 -0400)]
Expose (de)serialziers as we'll need them and I don't like warnings

6 years agoMerge pull request #178 from TheBlueMatt/2018-09-channel_reestablish
Matt Corallo [Sat, 15 Sep 2018 15:36:59 +0000 (11:36 -0400)]
Merge pull request #178 from TheBlueMatt/2018-09-channel_reestablish

Handle peer disconnect tracking/channel_reestablish

6 years agoConstify 2**48-1 and add some additional comments in Channel 2018-09-channel_reestablish
Matt Corallo [Fri, 14 Sep 2018 19:54:06 +0000 (15:54 -0400)]
Constify 2**48-1 and add some additional comments in Channel

6 years agoAdd a simple channel_reestablish test
Matt Corallo [Thu, 13 Sep 2018 22:19:27 +0000 (18:19 -0400)]
Add a simple channel_reestablish test

6 years agoTrack peer-disconnection in Channel and handle channel_reestablish
Matt Corallo [Sat, 8 Sep 2018 20:02:46 +0000 (16:02 -0400)]
Track peer-disconnection in Channel and handle channel_reestablish

6 years agoAdd a Disconnected ChannelState and check/handle it everywhere
Matt Corallo [Sat, 8 Sep 2018 20:01:29 +0000 (16:01 -0400)]
Add a Disconnected ChannelState and check/handle it everywhere

Setting/removing it comes next

6 years agoAdd channel_reestablish + peer_connected events to channel handler
Matt Corallo [Fri, 7 Sep 2018 19:51:40 +0000 (15:51 -0400)]
Add channel_reestablish + peer_connected events to channel handler

6 years agoClarify update_fail/fulfill_htlc holding cell allowed Errs
Matt Corallo [Tue, 11 Sep 2018 18:27:17 +0000 (14:27 -0400)]
Clarify update_fail/fulfill_htlc holding cell allowed Errs

Specifically, there really should be no Errs, but in case there is
some case where duplicate HTLC removes are possible, return
IgnoreError and debug_assert to see if fuzzing can find them.

6 years agoDrop channels on disconnection if we haven't funded them yet
Matt Corallo [Fri, 7 Sep 2018 19:11:52 +0000 (15:11 -0400)]
Drop channels on disconnection if we haven't funded them yet

6 years agoRemove/fail uncommitted HTLCs upon peer disconnection
Matt Corallo [Wed, 5 Sep 2018 22:32:55 +0000 (18:32 -0400)]
Remove/fail uncommitted HTLCs upon peer disconnection

6 years agoMerge pull request #179 from TheBlueMatt/2018-09-pre-178-cleanups
Matt Corallo [Sat, 15 Sep 2018 14:50:57 +0000 (10:50 -0400)]
Merge pull request #179 from TheBlueMatt/2018-09-pre-178-cleanups

Pre-reconnect ChannelManager test cleanups

6 years agoMerge pull request #183 from yuntai/201809-unwrap-getopenchannel
Matt Corallo [Sat, 15 Sep 2018 14:48:54 +0000 (10:48 -0400)]
Merge pull request #183 from yuntai/201809-unwrap-getopenchannel

unwrap channel.get_open_channel

6 years agounwrap channel.get_open_channel
Yuntai Kyong [Fri, 14 Sep 2018 22:26:03 +0000 (07:26 +0900)]
unwrap channel.get_open_channel

6 years agoSplit claim and fail payment functions to be able to skip one hop 2018-09-pre-178-cleanups
Matt Corallo [Thu, 13 Sep 2018 22:17:56 +0000 (18:17 -0400)]
Split claim and fail payment functions to be able to skip one hop

6 years agoMove all-events check into framework instead of per-test
Matt Corallo [Thu, 13 Sep 2018 22:04:46 +0000 (18:04 -0400)]
Move all-events check into framework instead of per-test

6 years agoSplit up send_commitment into a const and non-const version
Matt Corallo [Sat, 8 Sep 2018 20:00:30 +0000 (16:00 -0400)]
Split up send_commitment into a const and non-const version

6 years agoRemove unused import and uneccessary mut
Matt Corallo [Fri, 14 Sep 2018 20:24:08 +0000 (16:24 -0400)]
Remove unused import and uneccessary mut

6 years agoMerge pull request #180 from TheBlueMatt/2018-09-htlc-tx-unwrap-fix
Matt Corallo [Fri, 14 Sep 2018 20:19:38 +0000 (16:19 -0400)]
Merge pull request #180 from TheBlueMatt/2018-09-htlc-tx-unwrap-fix

Ignore HTLC txn we dont know how to claim instead of unwrap()ing and Do not fail-backwards LocalAnnounced HTLCs upon force-close.

6 years agoTweak + extend full_stack_target sample to incl HTLC tx broadcasts 2018-09-htlc-tx-unwrap-fix
Matt Corallo [Fri, 14 Sep 2018 17:47:46 +0000 (13:47 -0400)]
Tweak + extend full_stack_target sample to incl HTLC tx broadcasts

6 years agoTest that we do not fail-backwards HTLCs that the remote on-chained
Matt Corallo [Fri, 14 Sep 2018 19:19:03 +0000 (15:19 -0400)]
Test that we do not fail-backwards HTLCs that the remote on-chained

6 years agoMake the commitment signed dance a macro in ChannelManager tests
Matt Corallo [Thu, 13 Sep 2018 21:25:59 +0000 (17:25 -0400)]
Make the commitment signed dance a macro in ChannelManager tests

6 years agoDo not fail-backwards LocalAnnounced HTLCs upon force-close.
Matt Corallo [Fri, 14 Sep 2018 17:35:56 +0000 (13:35 -0400)]
Do not fail-backwards LocalAnnounced HTLCs upon force-close.

This is completely unsafe as we have provided the remote side with
a commitment_signed which they can broadcast, including the HTLC
transaction, and then could claim it on-chain after we've failed it
backwards!

6 years agoIgnore HTLC txn we dont know how to claim instead of unwrap()ing
Matt Corallo [Fri, 14 Sep 2018 03:54:15 +0000 (23:54 -0400)]
Ignore HTLC txn we dont know how to claim instead of unwrap()ing

This fixes a crash introduced in 3e149b1fb6624eef99b055bde772842f36
and introduces a test which will tickle the bug.

6 years agoMerge pull request #177 from TheBlueMatt/2018-09-163-cleanups
Matt Corallo [Fri, 14 Sep 2018 00:18:21 +0000 (20:18 -0400)]
Merge pull request #177 from TheBlueMatt/2018-09-163-cleanups

Optimize some ChannelMonitor stuff after #163

6 years agoClean up and clarify tx broadcast checks in channelmonitor tests 2018-09-163-cleanups
Matt Corallo [Thu, 13 Sep 2018 17:51:23 +0000 (13:51 -0400)]
Clean up and clarify tx broadcast checks in channelmonitor tests

This effecitlvey reverts the refactors in 383bd90a481bc146b3a3b1d8,
however keeps the actully new test code.

It also writes documentation for the super confusing tx test func
and makes it a bit less permissive.

6 years agoThere can only be one input in matched txn in ChannelMonitor
Matt Corallo [Thu, 13 Sep 2018 15:35:23 +0000 (11:35 -0400)]
There can only be one input in matched txn in ChannelMonitor

This lets us simplify a few tidbits of loop.

6 years agoOptimize check_spend_remote HTLC a tad by avoiding indirections
Matt Corallo [Thu, 13 Sep 2018 15:34:26 +0000 (11:34 -0400)]
Optimize check_spend_remote HTLC a tad by avoiding indirections

Instead of hopping a pointer, we're only ever going to return one
Transaction at max, so skip the Vec. Also avoid
re-pubkey-converting the revocation key.

6 years agoMerge pull request #163 from ariard/claim_revoked_htlc_tx
Matt Corallo [Thu, 13 Sep 2018 17:53:47 +0000 (13:53 -0400)]
Merge pull request #163 from ariard/claim_revoked_htlc_tx

Implement claiming of revoked HTLC transactions by ChannelMonitor

6 years agoMerge pull request #175 from TheBlueMatt/2018-09-173-whitespace-err
Matt Corallo [Thu, 13 Sep 2018 17:11:51 +0000 (13:11 -0400)]
Merge pull request #175 from TheBlueMatt/2018-09-173-whitespace-err

raise APIError from send_payment (#173 without whitespace nit)

6 years agoraise APIError from send_payment 2018-09-173-whitespace-err
Yuntai Kyong [Wed, 12 Sep 2018 20:23:12 +0000 (05:23 +0900)]
raise APIError from send_payment

add APIError::RouteError

6 years agoMerge pull request #174 from yuntai/201809-funding_created_sig
Matt Corallo [Thu, 13 Sep 2018 14:31:06 +0000 (10:31 -0400)]
Merge pull request #174 from yuntai/201809-funding_created_sig

verify incoming sig first to fail earlier

6 years agoverify incoming sig first and fail earlier
Yuntai Kyong [Thu, 13 Sep 2018 13:31:51 +0000 (22:31 +0900)]
verify incoming sig first and fail earlier

6 years agoAdd test of claiming HTLC-Timeout outputs based on a revoked commitment
Antoine Riard [Tue, 11 Sep 2018 01:44:50 +0000 (01:44 +0000)]
Add test of claiming HTLC-Timeout outputs based on a revoked commitment
tx

6 years agoImplement claiming of revoked HTLC transactions by ChannelMonitor
Antoine Riard [Tue, 11 Sep 2018 01:40:53 +0000 (01:40 +0000)]
Implement claiming of revoked HTLC transactions by ChannelMonitor

Refactor check_spend_remote_transaction in part to check_spend_remote_htlc to
avoid lock mess in block_connected. We need
remote_commitment_txn_on_chain to match remote HTLC tx

6 years agoImplement set_their_delayed_payment_base_key in ChannelMonitor
Antoine Riard [Tue, 11 Sep 2018 01:37:31 +0000 (01:37 +0000)]
Implement set_their_delayed_payment_base_key in ChannelMonitor

Needed to build redeemscript on HTLC-Success/HTLC-Timeout tx from
remote revoked commitment tx

6 years agoMerge pull request #171 from TheBlueMatt/2018-09-ser-fixes
Matt Corallo [Wed, 12 Sep 2018 19:53:14 +0000 (15:53 -0400)]
Merge pull request #171 from TheBlueMatt/2018-09-ser-fixes

Correct MAX_BUF_SIZE in serialization

6 years agoCorrect MAX_BUF_SIZE in serialization 2018-09-ser-fixes
Matt Corallo [Wed, 12 Sep 2018 17:21:13 +0000 (13:21 -0400)]
Correct MAX_BUF_SIZE in serialization

I think this might have been my fault due to faulty review
feedback, but fuzzer caught trivial crash here where you try to
send a ping message larger than 16KB (but smaller than the
max-length 64KB) and you crash as message serialization is unwrap()

6 years agoFix some double-indentation in util/ser
Matt Corallo [Wed, 12 Sep 2018 17:20:20 +0000 (13:20 -0400)]
Fix some double-indentation in util/ser

6 years agoMerge pull request #167 from TheBlueMatt/2018-09-dup-htlc
Matt Corallo [Wed, 12 Sep 2018 17:07:13 +0000 (13:07 -0400)]
Merge pull request #167 from TheBlueMatt/2018-09-dup-htlc

 Allow duplicate-payment_hash HTLCs for HTLC forwards

6 years agoMerge pull request #170 from TheBlueMatt/2018-09-119-rebased
Matt Corallo [Wed, 12 Sep 2018 15:22:06 +0000 (11:22 -0400)]
Merge pull request #170 from TheBlueMatt/2018-09-119-rebased

#119 squashed

6 years agoAdd simple test for duplicate-payment_hash HTLC tracking 2018-09-dup-htlc
Matt Corallo [Tue, 11 Sep 2018 19:04:41 +0000 (15:04 -0400)]
Add simple test for duplicate-payment_hash HTLC tracking

6 years agoAvoid cross-test statics in ChannelManager network tests
Matt Corallo [Sun, 9 Sep 2018 01:02:42 +0000 (21:02 -0400)]
Avoid cross-test statics in ChannelManager network tests