aboutsummaryrefslogtreecommitdiff
path: root/main.h
diff options
context:
space:
mode:
authors_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2009-10-29 02:52:48 +0000
committers_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2009-10-29 02:52:48 +0000
commitdd519206a684c772a4a06ceecc87c665ad09d8be (patch)
tree08535edfd634944708c936fd596f3719ccf191d8 /main.h
parentfa2a0338d3f8b1c3a1d75bff39ff42e436cee0dc (diff)
addr relaying fixes, proxy option and privacy patches, detect connect to self, non-final tx locktime changes, fix hide unconfirmed generated
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@18 1a98c847-1fd6-4fd8-948a-caf3550aa51b
Diffstat (limited to 'main.h')
-rw-r--r--main.h16
1 files changed, 12 insertions, 4 deletions
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<CTxIn> vin;
vector<CTxOut> 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