File tree Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -1438,15 +1438,6 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
1438
1438
// // debug print
1439
1439
LogPrintf (" mapBlockIndex.size() = %u\n " , mapBlockIndex.size ());
1440
1440
LogPrintf (" nBestHeight = %d\n " , chainActive.Height ());
1441
- #ifdef ENABLE_WALLET
1442
- if (pwalletMain) {
1443
- LOCK (pwalletMain->cs_wallet );
1444
- LogPrintf (" setKeyPool.size() = %u\n " , pwalletMain->GetKeyPoolSize ());
1445
- LogPrintf (" mapWallet.size() = %u\n " , pwalletMain->mapWallet .size ());
1446
- LogPrintf (" mapAddressBook.size() = %u\n " , pwalletMain->mapAddressBook .size ());
1447
- }
1448
- #endif
1449
-
1450
1441
if (GetBoolArg (" -listenonion" , DEFAULT_LISTEN_ONION))
1451
1442
StartTorControl (threadGroup, scheduler);
1452
1443
@@ -1459,9 +1450,6 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
1459
1450
1460
1451
#ifdef ENABLE_WALLET
1461
1452
if (pwalletMain) {
1462
- // Add wallet transactions that aren't already in a block to mapTransactions
1463
- pwalletMain->ReacceptWalletTransactions ();
1464
-
1465
1453
// Run a thread to flush wallet periodically
1466
1454
threadGroup.create_thread (boost::bind (&ThreadFlushWalletDB, boost::ref (pwalletMain->strWalletFile )));
1467
1455
}
Original file line number Diff line number Diff line change @@ -3411,7 +3411,17 @@ bool CWallet::InitLoadWallet()
3411
3411
}
3412
3412
walletInstance->SetBroadcastTransactions (GetBoolArg (" -walletbroadcast" , DEFAULT_WALLETBROADCAST));
3413
3413
3414
+ {
3415
+ LOCK (walletInstance->cs_wallet );
3416
+ LogPrintf (" setKeyPool.size() = %u\n " , walletInstance->GetKeyPoolSize ());
3417
+ LogPrintf (" mapWallet.size() = %u\n " , walletInstance->mapWallet .size ());
3418
+ LogPrintf (" mapAddressBook.size() = %u\n " , walletInstance->mapAddressBook .size ());
3419
+ }
3420
+ // Add wallet transactions that aren't already in a block to mapTransactions
3421
+ walletInstance->ReacceptWalletTransactions ();
3422
+
3414
3423
pwalletMain = walletInstance;
3424
+
3415
3425
return true ;
3416
3426
}
3417
3427
You can’t perform that action at this time.
0 commit comments