From ed6d0b5f852dc5f1c9407abecb5a9c6a7e42b4b2 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Sun, 15 Apr 2012 22:10:54 +0200 Subject: Remove headers.h --- src/wallet.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/wallet.cpp') diff --git a/src/wallet.cpp b/src/wallet.cpp index 9f531082a..6a2bf022b 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -3,7 +3,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file license.txt or http://www.opensource.org/licenses/mit-license.php. -#include "headers.h" #include "db.h" #include "crypter.h" @@ -137,6 +136,11 @@ bool CWallet::ChangeWalletPassphrase(const SecureString& strOldWalletPassphrase, return false; } +void CWallet::SetBestChain(const CBlockLocator& loc) +{ + CWalletDB walletdb(strWalletFile); + walletdb.WriteBestBlock(loc); +} // This class implements an addrIncoming entry that causes pre-0.4 // clients to crash on startup if reading a private-key-encrypted wallet. -- cgit v1.2.3 From 9eace6b1130ce7eb938476750159ec0baf752531 Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Sun, 15 Apr 2012 17:39:49 -0400 Subject: Move CWalletDB code to new walletdb module. In addition to standard code separation, this change opens the door to fixing several include inter-dependencies. --- src/wallet.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/wallet.cpp') diff --git a/src/wallet.cpp b/src/wallet.cpp index 6a2bf022b..f8338b787 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -3,7 +3,8 @@ // Distributed under the MIT/X11 software license, see the accompanying // file license.txt or http://www.opensource.org/licenses/mit-license.php. -#include "db.h" +#include "wallet.h" +#include "walletdb.h" #include "crypter.h" using namespace std; -- cgit v1.2.3 From 6b6aaa1698838278a547f16a15e635bd58ec867d Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Mon, 16 Apr 2012 14:56:45 +0200 Subject: Further reduce header dependencies This commit removes the dependency of serialize.h on PROTOCOL_VERSION, and makes this parameter required instead of implicit. This is much saner, as it makes the places where changing a version number can have an influence obvious. --- src/wallet.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/wallet.cpp') diff --git a/src/wallet.cpp b/src/wallet.cpp index f8338b787..53836be0c 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -6,6 +6,7 @@ #include "wallet.h" #include "walletdb.h" #include "crypter.h" +#include "ui_interface.h" using namespace std; @@ -1121,7 +1122,7 @@ bool CWallet::CreateTransaction(const vector >& vecSend, CW return false; // Limit size - unsigned int nBytes = ::GetSerializeSize(*(CTransaction*)&wtxNew, SER_NETWORK); + unsigned int nBytes = ::GetSerializeSize(*(CTransaction*)&wtxNew, SER_NETWORK, PROTOCOL_VERSION); if (nBytes >= MAX_BLOCK_SIZE_GEN/5) return false; dPriority /= nBytes; -- cgit v1.2.3