aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2015-08-11 21:03:31 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2015-09-22 18:51:07 +0200
commit391dff16fe9ace90fc0f3308a5c63c453370e713 (patch)
tree3337a40ad6bca7c57560c45d091bb9ebfd6523cf /src/wallet/wallet.h
parente59d2a80f9167031521d882394a08b02fa9d0343 (diff)
downloadbitcoin-391dff16fe9ace90fc0f3308a5c63c453370e713.tar.xz
Do not store Merkle branches in the wallet.
Assume that when a wallet transaction has a valid block hash and transaction position in it, the transaction is actually there. We're already trusting wallet data in a much more fundamental way anyway. To prevent backward compatibility issues, a new record is used for storing the block locator in the wallet. Old wallets will see a wallet file synchronized up to the genesis block, and rescan automatically.
Diffstat (limited to 'src/wallet/wallet.h')
-rw-r--r--src/wallet/wallet.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index bd30b67b09..34e98cfb81 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -151,13 +151,8 @@ private:
public:
uint256 hashBlock;
- std::vector<uint256> vMerkleBranch;
int nIndex;
- // memory only
- mutable bool fMerkleVerified;
-
-
CMerkleTx()
{
Init();
@@ -172,13 +167,13 @@ public:
{
hashBlock = uint256();
nIndex = -1;
- fMerkleVerified = false;
}
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+ std::vector<uint256> vMerkleBranch; // For compatibility with older versions.
READWRITE(*(CTransaction*)this);
nVersion = this->nVersion;
READWRITE(hashBlock);