aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2017-03-07 17:11:49 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2017-03-07 17:11:59 +0100
commit3178b2c740f1ca3a90956e2e29012e8aa3c05e62 (patch)
treef20f77a30f4caed14152b058fb59513ada3b7a8d /src/wallet/wallet.h
parent6015df5b855fe600cf0b7a6e1782cb70315cc1b4 (diff)
parent630fc549e28cb33eb11df1b4f951339bf8152e4f (diff)
downloadbitcoin-3178b2c740f1ca3a90956e2e29012e8aa3c05e62.tar.xz
Merge #9369: Factor out CWallet::nTimeSmart computation into a method.
630fc54 Clean up braces in CWallet::ComputeTimeSmart (Russell Yanofsky) 6c996c2 Add documentation describing CWallet::nTimeSmart. (Russell Yanofsky) 1f98abe Factor out CWallet::nTimeSmart computation into a method. (Russell Yanofsky) c6b82d1 Add tests for CWalletTx::nTimeSmart (Russell Yanofsky) Tree-SHA512: 457a30251e572cf20dac0198af1a94128d269b1e0ce6605a213d56fc14d85c84a0a494e3dcbb18c201c4f39e6f7b000bd9cb6f283930d8452e4bb93ba406f8d4
Diffstat (limited to 'src/wallet/wallet.h')
-rw-r--r--src/wallet/wallet.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index 1007934909..02c1b18769 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -285,6 +285,15 @@ public:
std::vector<std::pair<std::string, std::string> > vOrderForm;
unsigned int fTimeReceivedIsTxTime;
unsigned int nTimeReceived; //!< time received by this node
+ /**
+ * Stable timestamp that never changes, and reflects the order a transaction
+ * was added to the wallet. Timestamp is based on the block time for a
+ * transaction added as part of a block, or else the time when the
+ * transaction was received if it wasn't part of a block, with the timestamp
+ * adjusted in both cases so timestamp order matches the order transactions
+ * were added to the wallet. More details can be found in
+ * CWallet::ComputeTimeSmart().
+ */
unsigned int nTimeSmart;
/**
* From me flag is set to 1 for transactions that were created by the wallet
@@ -800,6 +809,7 @@ public:
bool EncryptWallet(const SecureString& strWalletPassphrase);
void GetKeyBirthTimes(std::map<CTxDestination, int64_t> &mapKeyBirth) const;
+ unsigned int ComputeTimeSmart(const CWalletTx& wtx) const;
/**
* Increment the next transaction order id