We take over the --bookkeeper-dir and --bookkeeper-db options, and then if we can find the bookkeeper db we extract the records to initialize our chain_moves and channel_moves tables. Of course, bookkeeper now needs to not register those options. When bookkeeper gets invoked the first time, it will reconstruct everything from listchannelmoves and listcoinmoves. It cannot preserve manually-added descriptions, so we put those in the datastore for it ready to go. Note that the order of onchain_fee changes slightly from the original. But this is fine. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
11 lines
339 B
C
11 lines
339 B
C
#ifndef LIGHTNING_WALLET_ACCOUNT_MIGRATION_H
|
|
#define LIGHTNING_WALLET_ACCOUNT_MIGRATION_H
|
|
#include "config.h"
|
|
|
|
struct lightningd;
|
|
struct db;
|
|
|
|
/* Some migrations are so epic they get their own file. Not in a good way. */
|
|
void migrate_from_account_db(struct lightningd *ld, struct db *db);
|
|
#endif /* LIGHTNING_WALLET_ACCOUNT_MIGRATION_H */
|