|
@ -720,9 +720,6 @@ int main(int argc, char *argv[]) |
|
|
/*~ Initialize the transaction filter with our pubkeys. */ |
|
|
/*~ Initialize the transaction filter with our pubkeys. */ |
|
|
init_txfilter(ld->wallet, ld->owned_txfilter); |
|
|
init_txfilter(ld->wallet, ld->owned_txfilter); |
|
|
|
|
|
|
|
|
/*~ Pull peers, channels and HTLCs from db. */ |
|
|
|
|
|
load_channels_from_wallet(ld); |
|
|
|
|
|
|
|
|
|
|
|
/*~ Get the blockheight we are currently at, UINT32_MAX is used to signal
|
|
|
/*~ Get the blockheight we are currently at, UINT32_MAX is used to signal
|
|
|
* an uninitialized wallet and that we should start off of bitcoind's |
|
|
* an uninitialized wallet and that we should start off of bitcoind's |
|
|
* current height */ |
|
|
* current height */ |
|
@ -747,6 +744,13 @@ int main(int argc, char *argv[]) |
|
|
setup_topology(ld->topology, &ld->timers, |
|
|
setup_topology(ld->topology, &ld->timers, |
|
|
min_blockheight, max_blockheight); |
|
|
min_blockheight, max_blockheight); |
|
|
|
|
|
|
|
|
|
|
|
/*~ Pull peers, channels and HTLCs from db. Needs to happen after the
|
|
|
|
|
|
* topology is initialized since some decisions rely on being able to |
|
|
|
|
|
* know the blockheight. */ |
|
|
|
|
|
db_begin_transaction(ld->wallet->db); |
|
|
|
|
|
load_channels_from_wallet(ld); |
|
|
|
|
|
db_commit_transaction(ld->wallet->db); |
|
|
|
|
|
|
|
|
/*~ Now create the PID file: this errors out if there's already a
|
|
|
/*~ Now create the PID file: this errors out if there's already a
|
|
|
* daemon running, so we call before trying to create an RPC socket. */ |
|
|
* daemon running, so we call before trying to create an RPC socket. */ |
|
|
pid_fd = pidfile_create(ld); |
|
|
pid_fd = pidfile_create(ld); |
|
|