diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2011-09-28 21:52:32 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2011-09-28 21:52:32 +0200 |
commit | 002a4dcad0c0f74b1063cf27f0a9550d5e56c3f0 (patch) | |
tree | 58a16a226571a80537bfa7e3b1147aa4d0ee8767 /src/main.h | |
parent | a8b95ce6ed5e84d34748ecdd0ff1db4d03377cf0 (diff) | |
parent | 4dcad1d294e264a81280fd007d1508d9bd4f0273 (diff) | |
download | bitcoin-002a4dcad0c0f74b1063cf27f0a9550d5e56c3f0.tar.xz |
Merge branch 'master' of https://github.com/bitcoin/bitcoin
Conflicts:
.gitignore (used upstream version)
bitcoin-qt.pro
Diffstat (limited to 'src/main.h')
-rw-r--r-- | src/main.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main.h b/src/main.h index a8deb2b92b..1106bb9785 100644 --- a/src/main.h +++ b/src/main.h @@ -400,6 +400,9 @@ public: std::vector<CTxOut> vout; unsigned int nLockTime; + // Denial-of-service detection: + mutable int nDoS; + bool DoS(int nDoSIn, bool fIn) const { nDoS += nDoSIn; return fIn; } CTransaction() { @@ -421,6 +424,7 @@ public: vin.clear(); vout.clear(); nLockTime = 0; + nDoS = 0; // Denial-of-service prevention } bool IsNull() const @@ -787,6 +791,9 @@ public: // memory only mutable std::vector<uint256> vMerkleTree; + // Denial-of-service detection: + mutable int nDoS; + bool DoS(int nDoSIn, bool fIn) const { nDoS += nDoSIn; return fIn; } CBlock() { @@ -820,6 +827,7 @@ public: nNonce = 0; vtx.clear(); vMerkleTree.clear(); + nDoS = 0; } bool IsNull() const |