aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.cpp
diff options
context:
space:
mode:
authorGavin Andresen <[email protected]>2013-02-04 16:56:26 -0500
committerGavin Andresen <[email protected]>2013-02-05 10:08:35 -0500
commit41e1a0d7663d479f437c779df90775fc2bbc4087 (patch)
tree9dee872551006a837eb0b3cc46b87ac74addd033 /src/wallet.cpp
parentMerge pull request #2237 from petertodd/testnet-dnsseed (diff)
downloaddiscoin-41e1a0d7663d479f437c779df90775fc2bbc4087.tar.xz
discoin-41e1a0d7663d479f437c779df90775fc2bbc4087.zip
Make transactions larger than 100K non-standard
Extremely large transactions with lots of inputs can cost the network almost as much to process as they cost the sender in fees. We would never create transactions larger than 100K big; this change makes transactions larger than 100K non-standard, so they are not relayed/mined by default. This is most important for miners that might create blocks larger than 250K big, who could be vulnerable to a make-your-blocks-so-expensive-to-verify-they-get-orphaned attack.
Diffstat (limited to 'src/wallet.cpp')
-rw-r--r--src/wallet.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp
index b8ef2a20b..2317ac31a 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -1208,7 +1208,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64> >& vecSend, CW
// Limit size
unsigned int nBytes = ::GetSerializeSize(*(CTransaction*)&wtxNew, SER_NETWORK, PROTOCOL_VERSION);
- if (nBytes >= MAX_BLOCK_SIZE_GEN/5)
+ if (nBytes >= MAX_STANDARD_TX_SIZE)
return false;
dPriority /= nBytes;