lightning-terminal/accounts
Viktor Torstensson a493b6a3d6
accounts: optionally cap account balances at the node channel balance
Add an opt-in check that prevents the sum of all account balances from
exceeding the node's available local (outbound) channel balance. When
enabled via the new accounts.check-channel-balance config option, the
service rejects balance allocations that would over-provision the node:
creating an account, an administrative credit, or an administrative
balance increase now fails with ErrBalanceReservationExceeded if it
would push the total allocated balance above the node's local channel
balance.

Note that the total channel balance may still decrease below the already
allocated account balance. This can occur if the node operator decreases
the total channel balance through non-account related activity.

The check is a no-op by default to preserve the historical behaviour
where the operator manages over-provisioning themselves (accounts can
legitimately be created before channels are funded). Invoice-driven
credits are unaffected, as they are backed by real inbound payments.
2026-08-07 12:26:29 +02:00
..
benchmark_test.go multi: rename MigrationStream names to MigrationSet 2026-05-14 11:39:09 +02:00
checkers.go accounts: add a configurable maximum account payment size 2026-08-07 00:04:20 +02:00
checkers_test.go accounts: add a configurable maximum account payment size 2026-08-07 00:04:20 +02:00
context.go multi: update LND and friends 2025-03-26 09:20:52 -05:00
errors.go accounts: use UpsertAccountPayment in removePayment 2025-01-21 12:20:33 +02:00
interceptor.go accounts: remove accountFromMacaroon helper 2025-05-21 14:14:12 +02:00
interceptor_test.go accounts: add an IDFromCaveates helper 2025-03-04 13:43:13 +02:00
interface.go accounts: optionally cap account balances at the node channel balance 2026-08-07 12:26:29 +02:00
log.go multi: update LND and friends 2025-03-26 09:20:52 -05:00
rpcserver.go accounts: implement AccountPayments RPC handler 2026-07-22 14:06:26 -05:00
service.go accounts: optionally cap account balances at the node channel balance 2026-08-07 12:26:29 +02:00
service_test.go accounts: optionally cap account balances at the node channel balance 2026-08-07 12:26:29 +02:00
sql_migration.go Merge pull request #1309 from ViktorT-11/2026-05-add-master-additions-to-migration-code 2026-05-19 17:28:45 -07:00
sql_migration_test.go accounts: export kvdb DB 2026-05-14 11:38:32 +02:00
store_kvdb.go accounts: implement ListAccountPayments in BoltStore 2026-07-22 14:06:25 -05:00
store_kvdb_deprecation_test.go multi: deprecate kvdb stores after SQL migration 2026-05-14 11:39:14 +02:00
store_sql.go accounts: implement ListAccountPayments in SQLStore 2026-07-22 14:06:25 -05:00
store_test.go accounts: add payment methods to Store interface 2026-07-22 14:06:25 -05:00
test_kvdb.go accounts: export kvdb DB 2026-05-14 11:38:32 +02:00
test_postgres.go mutli: rename db.NewTestPostgresV2DB function 2026-05-14 11:37:54 +02:00
test_sql.go multi: use sqldb/v2 in accounts package 2026-05-14 11:37:41 +02:00
test_sqlite.go multi: rename MigrationStream names to MigrationSet 2026-05-14 11:39:09 +02:00
tlv.go multi: reformat long lines for readability 2025-12-09 16:12:03 +00:00