From cc0b4c3b62367a2aebe5fc1f4d0ed4b97e9c2ac9 Mon Sep 17 00:00:00 2001 From: s_nakamoto Date: Thu, 29 Oct 2009 02:52:48 +0000 Subject: addr relaying fixes, proxy option and privacy patches, detect connect to self, non-final tx locktime changes, fix hide unconfirmed generated --- main.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'main.h') diff --git a/main.h b/main.h index 6b11285e5e..958f7a5f1c 100644 --- a/main.h +++ b/main.h @@ -366,7 +366,7 @@ public: int nVersion; vector vin; vector vout; - int nLockTime; + unsigned int nLockTime; CTransaction() @@ -401,9 +401,15 @@ public: return SerializeHash(*this); } - bool IsFinal() const + bool IsFinal(int64 nBlockTime=0) const { - if (nLockTime == 0 || nLockTime < nBestHeight) + // Time based nLockTime implemented in 0.1.6, + // do not use time based until most 0.1.5 nodes have upgraded. + if (nBlockTime == 0) + nBlockTime = GetAdjustedTime(); + if (nLockTime == 0) + return true; + if (nLockTime < (nLockTime < 500000000 ? nBestHeight : nBlockTime)) return true; foreach(const CTxIn& txin, vin) if (!txin.IsFinal()) @@ -686,8 +692,9 @@ public: char fSpent; //// probably need to sign the order info so know it came from payer - // memory only + // memory only UI hints mutable unsigned int nTimeDisplayed; + mutable int nLinesDisplayed; CWalletTx() @@ -712,6 +719,7 @@ public: fFromMe = false; fSpent = false; nTimeDisplayed = 0; + nLinesDisplayed = 0; } IMPLEMENT_SERIALIZE -- cgit v1.2.3