diff options
| author | Pieter Wuille <[email protected]> | 2012-04-17 11:04:29 -0700 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2012-04-17 11:04:29 -0700 |
| commit | 1ffeb89a52d82bb62860786ff6426224437ca7b1 (patch) | |
| tree | 62a79e33a866c2a92f548cecb6148c7339f8beaf /src/wallet.cpp | |
| parent | Merge pull request #1106 from jgarzik/sign-compare (diff) | |
| parent | Further reduce header dependencies (diff) | |
| download | discoin-1ffeb89a52d82bb62860786ff6426224437ca7b1.tar.xz discoin-1ffeb89a52d82bb62860786ff6426224437ca7b1.zip | |
Merge pull request #1112 from sipa/saneserial
Further reduce header dependencies
Diffstat (limited to 'src/wallet.cpp')
| -rw-r--r-- | src/wallet.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp index 9f531082a..53836be0c 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -3,9 +3,10 @@ // 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 "wallet.h" +#include "walletdb.h" #include "crypter.h" +#include "ui_interface.h" using namespace std; @@ -137,6 +138,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. @@ -1116,7 +1122,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64> >& 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; |