Commit graph

24 commits

Author SHA1 Message Date
Boris Nagaev
5d8a5019cf
lint: enable deprecation checks
Enable staticcheck's SA1019 check in golangci-lint so deprecated
identifiers are caught in CI.

Replace deprecated standard library and bbolt APIs with their current
equivalents. Keep intentional compatibility reads and writes of
deprecated Loop RPC fields behind narrow nolint annotations, because
older clients and persisted liquidity parameters still depend on those
fields.
2026-06-22 12:46:12 -05:00
Slyghtning
72a38c535b
Merge pull request #1133 from 0xfandom/refactor/1056-move-parameters-to-script
staticaddr: move address.Parameters to script package
2026-05-20 22:02:57 +02:00
Slyghtning
6aa6979e77
staticaddr: validate server address parameters 2026-05-11 08:59:03 +02:00
0xfandom
8b89f77529 staticaddr: move address.Parameters to script package
The Parameters struct describes the keys, expiry and pkScript that
define the static address script, so its natural home is the script
package. Moving it there lets staticutil drop its dependency on the
address package and lets callers reuse a single type alongside
script.StaticAddress and script.NewStaticAddress.

No behavior change.

Closes #1056
2026-05-01 15:54:37 +05:30
Slyghtning
a10c741a26
lint: fix linter issues 2026-03-09 14:39:45 +01:00
Slyghtning
0b295123e7
staticaddr: remove dead code across managers
Remove unused errChan fields from the loopin, openchannel, and withdraw
managers. These channels were declared and initialized but never read
from or written to.

Remove the unused activeLoopIns map from the loopin manager. The map
was only written to but never read, making it dead code.

Remove the stale withdraw.Store interface whose method signatures no
longer match the concrete SqlStore API used by the manager.

Remove unused config fields from openchannel.Config (Server,
AddressManager, ChainNotifier, Signer) and deposit.ManagerConfig
(AddressClient, SwapClient, ChainParams) along with their daemon
wiring. Also remove the now-orphaned openchannel.AddressManager
interface.

Remove the unused GetStaticAddress and Close methods from
address.SqlStore and the GetStaticAddress method from the address.Store
interface, as the codebase only uses GetAllStaticAddresses.
2026-03-09 14:39:44 +01:00
Slyghtning
a9977dd5f4
godoc: address copy-paste errors accross the codebase 2026-03-09 14:39:44 +01:00
Slyghtning
a918842374
staticutil: refactor methods into utils 2025-12-09 12:21:51 +01:00
Boris Nagaev
6d480cfd9e
staticaddr: require positive heights at startup
Loop now guards all static-address managers against zero block heights: each
constructor returns an error when invoked with a non-positive current height,
and `loopd` validates the height from `GetInfo` before instantiating them.
Tests and helper code were updated accordingly so we fail fast instead of
registering chain notifications with invalid hints.
2025-11-16 01:24:01 -03:00
Slyghtning
e98f733ef8
linter: fix lint issues after linter v2 update 2025-08-19 21:57:00 +02:00
Slyghtning
13247c4651
staticaddr: wait for address manager initiation 2025-06-13 15:37:38 +02:00
Slyghtning
cf0651af38
staticaddr: add expiry to NewAddress response 2025-05-15 14:56:49 +02:00
Boris Nagaev
dc4a5641ac
multi: initialize block height in New, not in Run
If Run sets the current height field, it is technically a race between Run and
other methods reading the field. Setting in New is a safer option.

Removed a check that height is not 0 from static address manager.
2025-03-19 15:00:31 +01:00
Boris Nagaev
4c292f179f
staticaddr: fix race conditions in current height
Make the current height an atomic variable in staticaddr/address/manager.go and
in staticaddr/withdraw/manager.go.
Removed the initiation height from staticaddr/deposit/manager.go (not needed).
2025-03-19 15:00:30 +01:00
Oliver Gugger
722ad8839d
multi: update lnd compile-time dependency to v0.19.0 2025-03-10 22:59:49 +01:00
Slyghtning
fc6c9f224c
staticaddr: add initiation height of address 2024-12-12 18:31:10 +01:00
sputn1ck
115558bed5
staticaddr/loopin: remove unused code 2024-12-12 18:31:09 +01:00
Slyghtning
f8535a0aea
unit: manager mocks for static address loop-in 2024-12-12 18:31:07 +01:00
Slyghtning
ea2b3c84f0
staticaddr: expose static address to client summary 2024-12-12 18:31:05 +01:00
Slyghtning
1f2ec79fed
staticaddr: address and deposit adjustments for withdrawals 2024-12-12 18:31:04 +01:00
Slyghtning
9e56be74c5
log: unified static address logger 2024-12-12 18:31:04 +01:00
Slyghtning
b7b553cf1e
unit: manager tests 2024-12-12 18:31:04 +01:00
Slyghtning
042fe9f325
staticaddr: deposit manager and fsm 2024-12-12 18:31:03 +01:00
Slyghtning
52a11a0b1b
staticaddr: interfaces 2024-12-12 18:31:03 +01:00