lightning-terminal/session
Viktor Torstensson b4b36f653f
session: handle removed linked account
If a user creates a session linked to an account, but later deletes that
account using the `litcli accounts remove` command, the KVDB session
will still contain the account ID of the removed account.

During the KVDB to SQL migration, the accounts migration runs before the
sessions migration. Since the deleted account no longer exists, it
cannot be migrated. As a result, the migrated SQL session cannot link to
the now non-existent account in the SQL store.

In such cases, we will migrate the session and not link to any account
in the SQL session.
2025-09-26 20:46:50 +02:00
..
migration1 session: fix linter issues 2024-04-25 14:49:45 +02:00
migration2 session: migration to populate group ID to session ID indexes 2023-08-30 12:34:28 +02:00
migtest session: add new ID-to-key index 2023-08-30 11:46:33 +02:00
context.go session: add session ID to grpc metadata via context 2025-05-15 06:15:10 +02:00
errors.go session: use error variables 2025-02-27 08:07:51 +02:00
interface.go firewalldb+rpcserver: refactor ListActions 2025-05-09 13:57:10 +02:00
kvdb_store.go session: fix and test some return values 2025-04-07 13:41:27 +02:00
log.go multi: update LND and friends 2025-03-26 09:20:52 -05:00
macaroon.go multi: move macaroon helpers to macaroons dir 2025-02-09 10:37:40 +02:00
metadata.go session: migration to populate group ID to session ID indexes 2023-08-30 12:34:28 +02:00
privacy_flags.go refactor: using slices.Contains to simplify the code 2025-01-09 15:38:45 +08:00
privacy_flags_test.go firewall: obfuscate ConnectPeer 2024-07-02 18:21:42 +02:00
server.go session: add session ID to grpc metadata via context 2025-05-15 06:15:10 +02:00
sql_migration.go session: handle removed linked account 2025-09-26 20:46:50 +02:00
sql_migration_test.go session: handle removed linked account 2025-09-26 20:46:50 +02:00
sql_store.go session: embed db.BaseDB in SQLStore 2025-04-15 11:24:49 +02:00
store_test.go session: fix and test some return values 2025-04-07 13:41:27 +02:00
test_kvdb.go session: update NewTestDB funcs to return Store 2025-06-12 11:52:38 +02:00
test_postgres.go session: ensure that test SQL store is closed 2025-06-12 11:52:39 +02:00
test_sql.go session: ensure that test SQL store is closed 2025-06-12 11:52:39 +02:00
test_sqlite.go session: ensure that test SQL store is closed 2025-06-12 11:52:39 +02:00
tlv.go session: assert account exists before linking a session to it 2025-03-04 13:43:42 +02:00
tlv_test.go session: functional options for NewSession 2025-02-27 15:00:02 +02:00