Commit graph

1934 commits

Author SHA1 Message Date
Andras Banki-Horvath
b72f5d2e32
github: enable gemini code review 2025-07-09 15:53:36 +02:00
Slyghtning
e145963f2e
Merge pull request #956 from hieblmi/minor-static-fixes
staticaddr: minor fixes
2025-06-23 11:17:25 +02:00
Slyghtning
d526192de7
staticaddr: thread-safe loop-in recovery 2025-06-23 11:00:06 +02:00
Slyghtning
3963bad3a1
staticaddr: remove duplicate deposit finalize method 2025-06-23 11:00:06 +02:00
Slyghtning
f7769d2bf8
Merge pull request #954 from hieblmi/fix-deadlock
staticaddr: fix deposit recovery deadlock
2025-06-23 10:59:47 +02:00
Slyghtning
c579a3e933
staticaddr: fix deposit recovery deadlock 2025-06-23 10:35:16 +02:00
Boris Nagaev
3153489ea2
Merge pull request #965 from starius/fix-release-sh
release.sh: fix version matching
2025-06-20 11:36:27 -03:00
Boris Nagaev
7a4dbb751e
release.sh: fix version matching
A commit_hash component was added to the version string:
"loop version 0.31.2-beta commit=v0.31.2-beta-dirty commit_hash=xxx".
As .* is greedy, it captured "0.31.2-beta commit=v0.31.2-beta-dirty"
instead of just "0.31.2-beta".

This commit fixes this.
2025-06-17 19:44:57 -03:00
Alex Bosworth
e5751709d2
Merge pull request #964 from lightninglabs/update-to-v0.31.2
version: bump version to v0.31.2-beta
2025-06-17 14:47:27 -07:00
Alex Bosworth
761b5bb84f
version: bump version to v0.31.2-beta 2025-06-17 12:02:56 -07:00
Boris Nagaev
0ca371e6bc
Merge pull request #958 from starius/skip-utxos
loopout: ignore saved HTLC txid, add an option to skip some HTLC transactions
2025-06-17 15:55:55 -03:00
Boris Nagaev
1036214160
sweepbatcher: add an option to ignore HTLC txids
Added option WithSkippedTxns, which has one historical problematic tx by default.
Sweeps originating from these transactions are omitted when reading from DB.

loopdb: add column sweep_batches.cancelled and replaced DropBatch with
CancelBatch. It is needed, because sweep.batch_id is a foreign key to batch.

Changed StoreMock.InsertSweepBatch not to reuse batch_id. This is needed by
the test, which checks that new batch has fresh ID.
2025-06-17 14:47:49 -03:00
Boris Nagaev
1ab73a6272
loopout: ignore saved HTLC txid
If a reorg happens, the saved txid prevents loop-out from discoveing new txid.
2025-06-17 11:34:25 -03:00
Slyghtning
19ad091ff3
Merge pull request #953 from hieblmi/init-addr-mgr
staticaddr: wait for address manager initiation
2025-06-16 11:52:34 +02:00
Slyghtning
13247c4651
staticaddr: wait for address manager initiation 2025-06-13 15:37:38 +02:00
Boris Nagaev
59f67de306
Merge pull request #919 from starius/conf-chan
sweepbatcher: notify caller about confirmations
2025-06-12 15:14:15 -03:00
Boris Nagaev
c70257a4a5
sweepbatcher: notify caller about confirmations
Add fields ConfChan and ConfErrChan to SpendNotifier type which is a part of
SweepRequest passed to AddSweep method.

This is needed to reuse confirmation notifications on the calling side the same
way it is done for spending notifications.
2025-06-12 12:32:09 -03:00
Boris Nagaev
8466e0f8eb
sweepbatcher: test spending notification and error 2025-06-12 12:32:09 -03:00
Boris Nagaev
980c7d4e00
sweepbatcher: align dbBatch type with DB schema
Previously, dbBatch had a State field (enum: Open, Closed, Confirmed), but in
the database it is represented as a boolean Confirmed. The Closed state was
stored the same way as Open. This wasn't an issue in practice, since an Open
batch is quickly transitioned to Closed after startup.

However, the in-memory mock stores plain dbBatch instances, leading to
inconsistent behavior between the mock and the real DB-backed store. This
commit updates dbBatch to match the database representation by replacing
the State field with a Confirmed boolean.
2025-06-12 12:32:09 -03:00
Boris Nagaev
7edbfeadd8
sweepbatcher: store batch status before monitoring
If monitorConfirmations fails, we still want to persist the state to DB.
2025-06-12 12:32:09 -03:00
Boris Nagaev
fa1bc48a68
sweepbatcher: remove unneeded for loops
The loop always had exactly one iteration.
2025-06-12 12:31:58 -03:00
Boris Nagaev
01664ad635
sweepbatcher: cancel spendCtx after processing
Function monitorSpendAndNotify used to cancel the context passed to
RegisterSpendNtfn right after starting the goroutine processing results.
Spend notifications were missed.

Now the context is canceled when the goroutine finishes.
2025-06-11 10:34:22 -03:00
Boris Nagaev
2f05934dbb
test/chainnotifier_mock: support errors
Support sending errors to error channels returned by RegisterSpendNtfn and
RegisterConfirmationsNtfn.
2025-06-11 10:34:22 -03:00
Boris Nagaev
cb7c31c1b9
sweepbatcher: fix mistake in batch reading from DB 2025-06-11 10:34:22 -03:00
Boris Nagaev
c036c2adbd
sweepbatcher: fix mock TotalSweptAmount
Forgot to return the calculated total value.
2025-06-11 10:34:22 -03:00
Boris Nagaev
7636ffdc64
test: fix error messages 2025-06-11 10:34:22 -03:00
Boris Nagaev
39f859a046
sweepbatcher: send spend error to notifier 2025-06-11 10:34:22 -03:00
Boris Nagaev
501faa8375
sweepbatcher: unblock sending if notifier quits 2025-06-11 10:34:22 -03:00
Boris Nagaev
6a32b46132
sweepbatcher: mark channels receive- or send-only 2025-06-11 10:34:22 -03:00
Slyghtning
80828c272c
Merge pull request #938 from hieblmi/withdraw-info
staticaddr: persist withdrawal info
2025-06-10 17:49:20 +02:00
Slyghtning
06bbb90fb1
cmd: add listwithdrawals command 2025-06-10 17:07:32 +02:00
Slyghtning
614d61937e
loopd: retrieve historic withdrawal info 2025-06-10 17:07:32 +02:00
Slyghtning
5718f11162
staticaddr: store historic withdrawal info 2025-06-10 17:07:30 +02:00
Slyghtning
cd9bcdf6f7
looprpc: add ListStaticAddressWithdrawals for historic withdrawal information 2025-06-03 12:57:10 +02:00
Slyghtning
94aeae81ed
loopdb: withdrawal table and queries 2025-06-03 12:57:10 +02:00
Slyghtning
b780a9ae91
staticaddr: simplify handleWithdrawal 2025-05-28 11:58:02 +02:00
Konstantin Nick
ca8610e68e
Merge pull request #947 from lightninglabs/lnd-19-final
mod: bump to latest lnd, aperture and tapd
2025-05-27 13:25:32 +02:00
Oliver Gugger
5d16c50762
multi: bump Go version to v1.23.9 2025-05-26 15:58:07 +02:00
Oliver Gugger
45a83a70dc
mod: bump to latest lnd, aperture and tapd 2025-05-26 15:56:38 +02:00
András Bánki-Horváth
0ddcabed24
Merge pull request #946 from ViktorTigerstrom/2025-05-update-getinfo-response
Update commit_hash field to GetInfo response
2025-05-22 19:33:42 +02:00
Viktor Tigerström
3aaef99bec
docs: add release notes 2025-05-22 18:01:36 +02:00
Viktor Tigerström
78c406d67e
loop: add commit_hash to --version output
The `commit_hash` field will contain the full commit hash of the commit
that build was based on.
2025-05-22 18:01:36 +02:00
Viktor Tigerström
cdcacfe753
multi: update GetInfoResponse response
Update the output of the `commit_hash` field in the GetInfoResponse.
The `commit_hash` field will contain the most recent commit_hash that
the build was based on. If the build had uncommitted changes, this field
will contain the most recent commit hash, suffixed by "-dirty".

Note that this change also changes the output of `commit` field in the
`--version` command. The `Commit` field will now contain most recent git
commit tag.
2025-05-22 18:01:36 +02:00
Slyghtning
48a5f460b9
Merge pull request #944 from hieblmi/fix-static-commands
cmd: fix command descriptions
2025-05-19 16:32:17 +02:00
Slyghtning
1687590ef9
cmd: fix command descriptions 2025-05-19 15:53:03 +02:00
Slyghtning
b080f0125f
Merge pull request #943 from hieblmi/fix-msg
staticaddr: add expiry to NewAddress response
2025-05-15 15:15:45 +02:00
Slyghtning
cf0651af38
staticaddr: add expiry to NewAddress response 2025-05-15 14:56:49 +02:00
Boris Nagaev
38d74013c7
Merge pull request #942 from starius/sweepReq
staticaddr: fix crash in loop-in manager shutdown
2025-05-14 12:04:15 -03:00
Boris Nagaev
9f971cd371
staticaddr: fix crash in loop-in manager shutdown
If the notification manager shuts down, sweepReqs channel is closed and sweepReq
object received from it becomes nil, causing panic in handleLoopInSweepReq. Now
this is fixed by checking if the channel was closed and if it was shutting down
loop-in manager itself.
2025-05-13 19:21:57 -03:00
Boris Nagaev
890b91cd26
Merge pull request #941 from starius/fix-log-w
staticaddr: fix logs, use %v not %w in logs
2025-05-13 12:08:36 -03:00