Commit graph

20 commits

Author SHA1 Message Date
Matt Corallo
be8213b244 Fix handling RAA when a monitor update previously failed 2019-01-22 14:38:56 -05:00
Matt Corallo
4cceb58f91 Rewrite monitor_update_failed as it didn't capture all the options
Primarily this fixes the case where we receive an RAA which does
not require a response, allowing us to call monitor_update_failed
without generating pending messages.
2019-01-22 14:34:18 -05:00
Matt Corallo
12d25576c1 Upgrade to secp256k1 v12, bitcoin v16, and crates bitcoin_hashes 2019-01-22 13:49:15 -05:00
Matt Corallo
4f4a5c06d2 Fix Router min HTLC comparison 2019-01-22 12:22:40 -05:00
Philip Robinson
a48fb848d9 Wrote test to explicitly test BOLT 2 requirements for update_add_htlc
(minor tweaks by @TheBlueMatt)
2019-01-22 12:22:14 -05:00
Matt Corallo
d8707c2b20 Check for timing-out HTLCs in remote unrevoked commitments
This resolves a TODO/issue in would_broadcast_at_height where we
will not fail a channel with HTLCs which time out in remote
broadcastable transactions.
2019-01-13 12:59:19 -05:00
Matt Corallo
78939a7e03 Test for failing channel after local commitment dust HTLC timeout 2019-01-13 12:59:19 -05:00
Matt Corallo
c9df4bd011 Fix multi-remote-HTLC-claim preimage learning
When our counterparty claims multiple HTLCs from offered outputs in
one transaction we should still be able to learn the preimages.
Sadly, due to two bugs we were not previously doing so.
2019-01-08 22:47:23 -05:00
Matt Corallo
e662fa14af Fix stale comment in functional_tests after failing back async 2019-01-05 16:26:20 -05:00
Matt Corallo
e344b0a8fe Add test_commitment_revoked_fail_backward_exhaustive no_to_remote
This tests a case we previously didn't handle correctly where we
returned early if there was no to_remote output to claim and thus
failed to fail-backwards HTLCs which were present.
2019-01-05 16:24:50 -05:00
Matt Corallo
dbbf4914ea Add dust mode to test_commitment_revoked_fail_backward_exhaustive
This tests that we fail back HTLCs that don't make it into
commitment transactions the same as we test ones that do.
2019-01-05 16:24:50 -05:00
Antoine Riard
93fd3e8bb9 More comments/hardening test_fail_backwards_unrevoked_remote_announce 2018-12-31 19:56:32 -05:00
Matt Corallo
608cf1c89d Fail HTLC backwards on unrevoked remote commitment tx broadcast 2018-12-31 19:56:32 -05:00
Matt Corallo
726674ddb5 Macro-out BroadcastChannelUpdate-on-channel-close in func tests 2018-12-22 07:03:17 -05:00
Matt Corallo
044edd6e86 Fail HTLCs backwards asynchronously 2018-12-21 15:17:42 -05:00
Matt Corallo
c220a5c5cf Add an enum option to pending forwards to fail backwards 2018-12-20 22:56:32 -05:00
Matt Corallo
e5c1716f5c Refactor HTLCForwardInfo into an enum in prep for delayed-fail 2018-12-20 22:56:32 -05:00
Matt Corallo
4aa814d53c macro-out a bunch of PendingHTLCsForwardable+forward calls 2018-12-20 22:56:32 -05:00
Matt Corallo
28e2480c6e Drop needless mut found by rustc 1.22 2018-12-20 14:32:02 -05:00
Matt Corallo
2053edbe53 Move ChannelManager network tests into their own module 2018-12-20 14:32:02 -05:00