Commit Graph
40 Commits
Author SHA1 Message Date
ffranr 71298f7614 fn: fix documentation comment for Option
Remove the type generic from the `Option` type struct in the doc
comment.
2024-10-29 20:16:20 +00:00
ffranr c49d038540 fn: add OptionFromPtr function
Add a function `OptionFromPtr` that constructs an `Option` from a
pointer. The function signature is: `OptionFromPtr : *A -> Option[A]`.

This utility has proven useful in the taproot-assets project.
2024-10-29 20:16:20 +00:00
ffranr 7919b3f204 makefile+scripts: add Go version check to release command
This commit updates `scripts/release.sh` to include a check for the
correct Go version before executing the release build. This ensures that
the release binaries are built with the specified Go version,
maintaining consistency and integrity for developer signatures.
2024-10-23 13:34:35 +02:00
ffranr 9a972e1b0c itest: add basic invoice HTLC modifier integration test
This commit introduces a basic integration test for the invoice
HTLC modifier. The test covers scenarios where an invoice is settled with a
payment that is less than the invoice amount, facilitated by the invoice
HTLC modifier.
2024-09-19 09:21:38 +02:00
ffranr bbae7148aa multi: pass UpdateAddHtlc message custom records to invoice modifier 2024-09-19 09:21:38 +02:00
ffranr 0c6a1558d5 lntest: add HtlcModifier support to node RPC harness
This commit enhances the itest LND node harness to include support for
the new `HtlcModifier` RPC endpoint.
At the same time we move another method to the correct file.
2024-09-19 09:21:38 +02:00
ffranr 1975fa60e2 invoicesrpc: add HtlcModifier RPC endpoint and modifier RPC server
This commit introduces a singleton invoice HTLC modifier RPC server and
an endpoint to activate it. The server interfaces with the internal
invoice HTLC modifier interpreter, handling the marshalling between RPC
types and internal formats.
2024-09-19 09:21:37 +02:00
ffranr 008d265cdb invoicesrpc: add HTLC modifier to invoices RPC server
This commit integrates the HTLC modifier service into the
invoices RPC server.
2024-09-19 09:21:37 +02:00
ffranr 481dfe21bc lnd: initialize invoice settlement interceptor at server startup
This commit initiates the invoice settlement interceptor during the
main server startup, assigning it a handle within the server.
2024-09-19 09:21:37 +02:00
ffranr c58b6a25a2 invoices: integrate settlement interceptor with invoice registry
This commit updates the invoice registry to utilize the settlement
interceptor during the invoice settlement routine. It allows the
interceptor to capture the invoice, providing interception clients an
opportunity to determine the settlement outcome.
2024-09-19 09:21:37 +02:00
ffranr b8c8774b5d invoices: add invoice htlc interceptor service
This commit introduces a new invoice htlc interceptor service
that intercepts invoice HTLCs during their settlement phase. It forwards
HTLCs to a subscribed client to determine their settlement outcomes.

This commit also introduces an interface to facilitate integrating the
interceptor with other packages.
2024-09-19 09:21:36 +02:00
ffranr ccea257c92 itest: add itest for field modification HTLC interception response
Implement an integration test where an HTLC is intercepted and the
interception response modifies fields in the resultant p2p message.
2024-09-05 11:18:16 +02:00
ffranr fb14d8c96e routerrpc: extend HTLC forward interceptor resp with modification fields
This commit extends the forward HTLC intercept response with fields that
can be used in conjunction with a `ResumeModified` action to modify the
intercepted HTLC p2p message.
2024-09-05 11:18:15 +02:00
ffranr abca4b8234 htlcswitch: add resume modified HTLC action to switch
Introduce `ResumeModified` action to resume standard behavior of a p2p
message with optional modifications as specified by the client during
interception.
2024-09-05 11:18:15 +02:00
ffranr 8d1059f41c lnwire: add custom records field to type UpdateFulfillHtlc
- Introduce the field `CustomRecords` to the type `UpdateFulfillHtlc`.
- Encode and decode the new field into the `ExtraData` field of the
`update_fulfill_htlc` wire message.
- Empty `ExtraData` field is set to `nil`.
2024-09-05 11:18:15 +02:00
ffranr 81f6a8060f lnwire: add custom records field to type UpdateAddHtlc
- Introduce the field `CustomRecords` to the type `UpdateAddHtlc`.
- Encode and decode the new field into the `ExtraData` field of
  the `update_add_htlc` wire message.
2024-09-05 11:18:15 +02:00
ffranr af50694643 lnwire: add ExtraOpaqueData helper functions and methods
Introduces a couple of new helper functions for both the ExtraOpaqueData
and CustomRecords types along with new methods on the ExtraOpaqueData.
2024-09-05 11:18:15 +02:00
ffranr 17c0a70b07 lnwire: add unit tests for ExtraOpaqueData.PackRecords 2024-09-05 10:29:42 +02:00
ffranr 1297e8f7c7 htlcswitch: add missing method doc 2024-08-22 18:33:24 +02:00
ffranr 7df093b3b1 multi: improve comment grammar 2024-08-22 18:33:24 +02:00
ffranr 9f3593a341 lnwire: add type CustomRecords
This commit introduces the `CustomRecords` type in the `lnwire` package,
designed to hold arbitrary byte slices. Each entry in this map can
associate with TLV type values that are greater than or equal to 65536.
2024-08-22 18:33:24 +02:00
ffranr 2a6e54016f Makefile: add lint check for Go version in Dockerfile and YAML
Implemented linter scripts to ensure consistency of the Go version
specified in Dockerfiles and YAML files. These scripts verify that the
Go version used across these files is uniform, enhancing maintainability
and reducing configuration errors.

This commit also introduces a `GO_VERSION` Makefile variable to control
the Go version used throughout the project.
2024-08-01 14:09:58 +01:00
ffranr 077e6682fa Makefile: rename variable to ACTIVE_GO_VERSION
Renamed the Makefile variable `GO_VERSION` to `ACTIVE_GO_VERSION` for
improved clarity. This change also frees up the name `GO_VERSION` to be
used for defining the global Go version for reproducible binaries in a
subsequent commit.
2024-07-31 16:53:47 +01:00
ffranr d7a81a1fe3 multi: use Go version 1.22.5 throughout 2024-07-31 16:53:47 +01:00
ffranr 05db2c35df lntest: add test node name to tmp directory name
In this commit we add the LND node name to the temporary directory's
name. This change makes it easier to identify a particular test node's
temporary directory.

This commit also replaces the depreciated `ioutil.TempDir` function call
with `os.MkdirTemp`.
2024-03-26 18:28:41 +00:00
ffranr e0358df39e doc: update release notes 2024-02-27 17:08:02 +00:00
ffranr b308895583 lncli: unit test makes use of error wrapping during comparison
This commit modifies a unit test such that it inspects a wrapped error
rather than comparing errors by string.
2024-02-27 17:08:01 +00:00
ffranr cd566eb097 multi: fix fmt.Errorf error wrapping
Refactor fmt.Errorf usage to correctly wrap errors instead of using
non-wrapping format verbs.
2024-02-27 11:13:40 +00:00
ffranr 581c16d72f lint: ensure the linter checks fmt.Errorf error wrapping 2024-02-27 11:12:28 +00:00
ffranr 51e2da6fbc walletrpc: allow both txid fields populated during OutPoint unmarshall 2023-06-14 14:07:46 +01:00
ffranr 72a89520d4 walletrpc: export unmarshall lnrpc.OutPoint functionality 2023-06-14 14:07:46 +01:00
ffranr d72d2edfea docs: add release notes for chainkit RPC/cli 2022-12-07 14:50:15 +00:00
ffranr bab526f655 cmd: add chain subcommand
Chain subcommand includes the commands: getblock, getbestblock, and getblockhash.

This commit removes conflicting neutrino cli commands.
2022-12-07 14:50:15 +00:00
ffranr 1345b3c0aa itest: add chainkit test
This test covers GetBlock, GetBestBlock, and GetBlockHash.
2022-12-07 14:50:15 +00:00
ffranr 561bf82985 chainrpc: add chainkit RPC service
New endpoints: GetBlock, GetBestBlock, and GetBlockHash.
2022-12-07 14:50:14 +00:00
ffranr 308e7ce72d lnrpc: identify *.proto files as separate files within a given directory 2022-12-06 12:52:31 +00:00
ffranr 03f9549f97 chainrpc: generalise chain notifier RPC server name 2022-12-06 12:52:25 +00:00
ffranr 2067e32862 CI: update test coverage library go-acc 2022-12-05 13:15:10 +00:00
ffranr 8dfb2023a9 docker: correct comment concerning lnd build/install 2022-11-22 11:54:24 +00:00
Robyn 8ab914dae5 scripts: add ffranr PGP signing key [skip ci] 2022-10-10 19:08:28 +01:00