aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.h
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2019-04-17 13:27:02 -0400
committerMarcoFalke <falke.marco@gmail.com>2019-04-17 14:20:44 -0400
commitfad7c33342cb51b310a7dd372bfa675df8810367 (patch)
tree64bc06d2bdd76ca1dc13d9be5a28d6462e07e990 /src/wallet/wallet.h
parentfa46ac3127142358116c8473741708b3bb70ca15 (diff)
refactor: Add handleNotifications method to wallet
Further stylistic cleanups in touched files: * Sort the includes * Wrap long single-line constructors into multiple lines
Diffstat (limited to 'src/wallet/wallet.h')
-rw-r--r--src/wallet/wallet.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index 53de1ea065..62ba0aa962 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -11,16 +11,16 @@
#include <interfaces/handler.h>
#include <outputtype.h>
#include <policy/feerate.h>
+#include <script/ismine.h>
+#include <script/sign.h>
#include <streams.h>
#include <tinyformat.h>
#include <ui_interface.h>
#include <util/strencodings.h>
-#include <validationinterface.h>
-#include <script/ismine.h>
-#include <script/sign.h>
#include <util/system.h>
-#include <wallet/crypter.h>
+#include <validationinterface.h>
#include <wallet/coinselection.h>
+#include <wallet/crypter.h>
#include <wallet/walletdb.h>
#include <wallet/walletutil.h>
@@ -767,7 +767,10 @@ public:
unsigned int nMasterKeyMaxID = 0;
/** Construct wallet with specified name and database implementation. */
- CWallet(interfaces::Chain* chain, const WalletLocation& location, std::unique_ptr<WalletDatabase> database) : m_chain(chain), m_location(location), database(std::move(database))
+ CWallet(interfaces::Chain* chain, const WalletLocation& location, std::unique_ptr<WalletDatabase> database)
+ : m_chain(chain),
+ m_location(location),
+ database(std::move(database))
{
}
@@ -794,6 +797,9 @@ public:
/** Registered interfaces::Chain::Notifications handler. */
std::unique_ptr<interfaces::Handler> m_chain_notifications_handler;
+ /** Register the wallet for chain notifications */
+ void handleNotifications();
+
/** Interface for accessing chain state. */
interfaces::Chain& chain() const { assert(m_chain); return *m_chain; }
@@ -1208,8 +1214,6 @@ public:
/** Add a KeyOriginInfo to the wallet */
bool AddKeyOrigin(const CPubKey& pubkey, const KeyOriginInfo& info);
-
- friend struct WalletTestingSetup;
};
/**