lightning-terminal/accounts
Viktor Tigerström d52b4565f2
multi: separate account RPC server init & start
In the upcoming actions migration, we need fetch LNDs macaroons prior to
initializing the stores, as the macaroons will be required during the
migration.

This requires that we setup the connection to LND before we initialize
the stores, as we can only fetch the macaroons after the LND connection
is established.

In preparation of doing so, we cannot reference the stores when
initializing/creating the accounts RPC server object, as we do so prior
to setting up the LND connection.

This commit therefore refactors the accounts RPC server so that we
separate the initializing from the starting of the RPC server, and only
require the store reference during the actual startup of the RPC server.

Note that we still keep the init of the accounts RPC server reference
prior to setting up the LND connection, as not doing so would require
that we'd refactor the registering of `GrpcSubserver`s in a more complex
and in a less elegant way.
2025-09-01 10:30:19 +02:00
..
checkers.go accounts: let interface methods take a context 2025-01-16 09:19:04 +02:00
checkers_test.go accounts: implement CreditAccount & DebitAccount 2025-03-31 02:18:56 +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: implement CreditAccount & DebitAccount 2025-03-31 02:18:56 +02:00
log.go multi: update LND and friends 2025-03-26 09:20:52 -05:00
rpcserver.go multi: separate account RPC server init & start 2025-09-01 10:30:19 +02:00
service.go accounts: implement CreditAccount & DebitAccount 2025-03-31 02:18:56 +02:00
service_test.go accounts: assert no startup error in tests 2025-01-23 09:20:09 +02:00
sql_migration.go accounts: iterate over bbolt buckets in migration 2025-06-09 13:01:28 +02:00
sql_migration_test.go mod+accounts+session: update to latest lnd RC 2025-07-11 18:41:16 +02:00
store_kvdb.go accounts: implement kvdb DebitAccount 2025-02-18 12:19:49 +01:00
store_sql.go accounts: keep the full *db.BaseDB pointer 2025-03-02 13:36:57 +02:00
store_test.go accounts: add SQL store implementation 2025-02-21 10:35:06 -03:00
test_kvdb.go accounts: update NewTestDB func to return Store 2025-05-02 15:44:50 +07:00
test_postgres.go accounts: ensure that test SQL store is closed 2025-06-09 13:01:28 +02:00
test_sql.go accounts: ensure that test SQL store is closed 2025-06-09 13:01:28 +02:00
test_sqlite.go accounts: ensure that test SQL store is closed 2025-06-09 13:01:28 +02:00
tlv.go accounts+itest: fix linter and code style issues 2023-07-26 18:37:49 +02:00