aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatt Corallo <git@bluematt.me>2019-01-22 15:20:34 -0500
committerSuhas Daftuar <sdaftuar@gmail.com>2019-05-02 11:00:19 -0400
commit00e11e61c0211a62788611cd6a6714a393fdc26c (patch)
tree812a6a6e43235f93b7c7bda1862f08ca349c2d8e /src
parentf34fa719cf33a51d11f1d2219cbe73ccff6fd697 (diff)
[refactor] rename stateDummy -> orphan_state
Co-authored-by: Anthony Towns <aj@erisian.com.au> Suhas Daftuar <sdaftuar@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/net_processing.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index 74e33189dc..7f3af68042 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -1730,10 +1730,10 @@ void static ProcessOrphanTx(CConnman* connman, std::set<uint256>& orphan_work_se
// Use a dummy CValidationState so someone can't setup nodes to counter-DoS based on orphan
// resolution (that is, feeding people an invalid transaction based on LegitTxX in order to get
// anyone relaying LegitTxX banned)
- CValidationState stateDummy;
+ CValidationState orphan_state;
if (setMisbehaving.count(fromPeer)) continue;
- if (AcceptToMemoryPool(mempool, stateDummy, porphanTx, &fMissingInputs2, &removed_txn, false /* bypass_limits */, 0 /* nAbsurdFee */)) {
+ if (AcceptToMemoryPool(mempool, orphan_state, porphanTx, &fMissingInputs2, &removed_txn, false /* bypass_limits */, 0 /* nAbsurdFee */)) {
LogPrint(BCLog::MEMPOOL, " accepted orphan tx %s\n", orphanHash.ToString());
RelayTransaction(orphanTx, connman);
for (unsigned int i = 0; i < orphanTx.vout.size(); i++) {
@@ -1748,7 +1748,7 @@ void static ProcessOrphanTx(CConnman* connman, std::set<uint256>& orphan_work_se
done = true;
} else if (!fMissingInputs2) {
int nDos = 0;
- if (stateDummy.IsInvalid(nDos) && nDos > 0) {
+ if (orphan_state.IsInvalid(nDos) && nDos > 0) {
// Punish peer that gave us an invalid orphan tx
Misbehaving(fromPeer, nDos);
setMisbehaving.insert(fromPeer);
@@ -1757,7 +1757,7 @@ void static ProcessOrphanTx(CConnman* connman, std::set<uint256>& orphan_work_se
// Has inputs but not accepted to mempool
// Probably non-standard or insufficient fee
LogPrint(BCLog::MEMPOOL, " removed orphan tx %s\n", orphanHash.ToString());
- if (!orphanTx.HasWitness() && !stateDummy.CorruptionPossible()) {
+ if (!orphanTx.HasWitness() && !orphan_state.CorruptionPossible()) {
// Do not use rejection cache for witness transactions or
// witness-stripped transactions, as they can have been malleated.
// See https://github.com/bitcoin/bitcoin/issues/8279 for details.