Commit Graph

14 Commits

Author SHA1 Message Date
Carla Kirk-Cohen
2fc8e9d617
multi: update channel db HTLC OnionBlob to array
We know that onion blobs in lightning are _exactly_ 1366 bytes in
lightning, but they are currently expressed as a byte slice in
channeldb's HTLC struct. Blobs are currently serialized as var bytes,
so we can take advantage of this known length and variable length
to add additional data to the inline serialization of our HTLCs, which
are otherwise not easily extensible (without creating a new bucket).
2023-06-02 11:01:43 -04:00
Joost Jager
511fb00777
htlcswitch: add final htlc event to notifier 2022-10-27 16:42:36 +02:00
Joost Jager
28256b7ea8
htlcswitch: keep final htlc outcome 2022-10-27 16:42:36 +02:00
Eng Zer Jun
c70e39cd21
multi: replace defer cleanup with t.Cleanup
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-10-13 17:46:54 +08:00
Oliver Gugger
7dfe4018ce
multi: use btcd's btcec/v2 and btcutil modules
This commit was previously split into the following parts to ease
review:
 - 2d746f68: replace imports
 - 4008f0fd: use ecdsa.Signature
 - 849e33d1: remove btcec.S256()
 - b8f6ebbd: use v2 library correctly
 - fa80bca9: bump go modules
2022-03-09 19:02:37 +01:00
Oliver Gugger
13f187046b
multi: fix issues reported by whitespace linter 2022-02-15 16:26:08 +01:00
Oliver Gugger
895a2e497b
multi: formatting and comment fixes 2022-02-10 11:02:02 +01:00
Andras Banki-Horvath
14c851c8fc
kvdb: move channeldb/kvdb to top level 2021-05-07 14:18:56 +02:00
Johan T. Halseth
bb406c82a9
contractcourt/htlc_timeout_test: expand timeout tests 2020-12-10 14:24:20 +01:00
Johan T. Halseth
aabba32b34
contractcourt: add TestHtlcSuccessSecondStageResolutionSweeper
Test success resolvers going through the sweeper.
2020-12-10 14:24:20 +01:00
Johan T. Halseth
d02b486195
contractcourt: revamp HTLC success unit test
We add checkpoint assertions and resume the resolver from every
checkpoint to ensure it can handle restarts.
2020-12-10 14:24:20 +01:00
eugene
c7cbacc35b multi: move mockChainIO, mockNotifier to lntest/mock 2020-08-31 19:41:09 -04:00
carla
03b76ad9a4
contractcourt: save htlc success resolvers, including first stage
Checkpoint our htlc claims with on chain reasolutions, including our
first stage success tx where required.
2020-07-07 19:49:55 +02:00
carla
eb07f89090
contractcourt/test: add test context for success resolver 2020-07-07 19:49:54 +02:00