aboutsummaryrefslogtreecommitdiff
path: root/src/main.h
diff options
context:
space:
mode:
authorGregory Maxwell <greg@xiph.org>2013-08-28 15:41:46 -0700
committerGregory Maxwell <greg@xiph.org>2013-08-28 15:49:51 -0700
commit9d14e689c86a395c11a530767db4ddf895446ba8 (patch)
treeb02fee2fa8d600da274cb1871bb7d7e56aad60de /src/main.h
parentbb7d0fc12fcfbb2a91e39cb49f2a0873344dbae0 (diff)
downloadbitcoin-9d14e689c86a395c11a530767db4ddf895446ba8.tar.xz
[raw] reject insanely high fees by default in sendrawtransaction
There have been several incidents where mainnet experimentation with raw transactions resulted in insane fees. This is hard to prevent in the raw transaction api because the inputs may not be known. Since sending doesn't work if the inputs aren't known, we can catch it there. This rejects fees > than 10000 * nMinRelayTxFee or 1 BTC with the defaults and can be overridden with a bool at the rpc.
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.h b/src/main.h
index a690a2bc9c..09e4700fbb 100644
--- a/src/main.h
+++ b/src/main.h
@@ -1082,7 +1082,7 @@ public:
std::map<uint256, CTransaction> mapTx;
std::map<COutPoint, CInPoint> mapNextTx;
- bool accept(CValidationState &state, const CTransaction &tx, bool fLimitFree, bool* pfMissingInputs);
+ bool accept(CValidationState &state, const CTransaction &tx, bool fLimitFree, bool* pfMissingInputs, bool fRejectInsaneFee = false);
bool addUnchecked(const uint256& hash, const CTransaction &tx);
bool remove(const CTransaction &tx, bool fRecursive = false);
bool removeConflicts(const CTransaction &tx);