@@ -760,8 +760,7 @@ static bool AcceptToMemoryPoolWorker(const CChainParams& chainparams, CTxMemPool
760
760
const uint256 &hashAncestor = ancestorIt->GetTx ().GetHash ();
761
761
if (setConflicts.count (hashAncestor))
762
762
{
763
- return state.DoS (100 , ValidationInvalidReason::CONSENSUS, false ,
764
- REJECT_INVALID, " bad-txns-spends-conflicting-tx" , false ,
763
+ return state.DoS (100 , ValidationInvalidReason::CONSENSUS, false , REJECT_INVALID, " bad-txns-spends-conflicting-tx" , false ,
765
764
strprintf (" %s spends conflicting transaction %s" ,
766
765
hash.ToString (),
767
766
hashAncestor.ToString ()));
@@ -803,8 +802,7 @@ static bool AcceptToMemoryPoolWorker(const CChainParams& chainparams, CTxMemPool
803
802
CFeeRate oldFeeRate (mi->GetModifiedFee (), mi->GetTxSize ());
804
803
if (newFeeRate <= oldFeeRate)
805
804
{
806
- return state.DoS (0 , ValidationInvalidReason::TX_MEMPOOL_POLICY, false ,
807
- REJECT_INSUFFICIENTFEE, " insufficient fee" , false ,
805
+ return state.DoS (0 , ValidationInvalidReason::TX_MEMPOOL_POLICY, false , REJECT_INSUFFICIENTFEE, " insufficient fee" , false ,
808
806
strprintf (" rejecting replacement %s; new feerate %s <= old feerate %s" ,
809
807
hash.ToString (),
810
808
newFeeRate.ToString (),
@@ -832,8 +830,7 @@ static bool AcceptToMemoryPoolWorker(const CChainParams& chainparams, CTxMemPool
832
830
nConflictingSize += it->GetTxSize ();
833
831
}
834
832
} else {
835
- return state.DoS (0 , ValidationInvalidReason::TX_MEMPOOL_POLICY, false ,
836
- REJECT_NONSTANDARD, " too many potential replacements" , false ,
833
+ return state.DoS (0 , ValidationInvalidReason::TX_MEMPOOL_POLICY, false , REJECT_NONSTANDARD, " too many potential replacements" , false ,
837
834
strprintf (" rejecting replacement %s; too many potential replacements (%d > %d)\n " ,
838
835
hash.ToString (),
839
836
nConflictingCount,
@@ -852,8 +849,7 @@ static bool AcceptToMemoryPoolWorker(const CChainParams& chainparams, CTxMemPool
852
849
// it's cheaper to just check if the new input refers to a
853
850
// tx that's in the mempool.
854
851
if (pool.exists (tx.vin [j].prevout .hash )) {
855
- return state.DoS (0 , ValidationInvalidReason::TX_MEMPOOL_POLICY, false ,
856
- REJECT_NONSTANDARD, " replacement-adds-unconfirmed" , false ,
852
+ return state.DoS (0 , ValidationInvalidReason::TX_MEMPOOL_POLICY, false , REJECT_NONSTANDARD, " replacement-adds-unconfirmed" , false ,
857
853
strprintf (" replacement %s adds unconfirmed input, idx %d" ,
858
854
hash.ToString (), j));
859
855
}
@@ -865,8 +861,7 @@ static bool AcceptToMemoryPoolWorker(const CChainParams& chainparams, CTxMemPool
865
861
// transactions would not be paid for.
866
862
if (nModifiedFees < nConflictingFees)
867
863
{
868
- return state.DoS (0 , ValidationInvalidReason::TX_MEMPOOL_POLICY, false ,
869
- REJECT_INSUFFICIENTFEE, " insufficient fee" , false ,
864
+ return state.DoS (0 , ValidationInvalidReason::TX_MEMPOOL_POLICY, false , REJECT_INSUFFICIENTFEE, " insufficient fee" , false ,
870
865
strprintf (" rejecting replacement %s, less fees than conflicting txs; %s < %s" ,
871
866
hash.ToString (), FormatMoney (nModifiedFees), FormatMoney (nConflictingFees)));
872
867
}
@@ -876,8 +871,7 @@ static bool AcceptToMemoryPoolWorker(const CChainParams& chainparams, CTxMemPool
876
871
CAmount nDeltaFees = nModifiedFees - nConflictingFees;
877
872
if (nDeltaFees < ::incrementalRelayFee.GetFee (nSize))
878
873
{
879
- return state.DoS (0 , ValidationInvalidReason::TX_MEMPOOL_POLICY, false ,
880
- REJECT_INSUFFICIENTFEE, " insufficient fee" , false ,
874
+ return state.DoS (0 , ValidationInvalidReason::TX_MEMPOOL_POLICY, false , REJECT_INSUFFICIENTFEE, " insufficient fee" , false ,
881
875
strprintf (" rejecting replacement %s, not enough additional fees to relay; %s < %s" ,
882
876
hash.ToString (),
883
877
FormatMoney (nDeltaFees),
@@ -899,7 +893,7 @@ static bool AcceptToMemoryPoolWorker(const CChainParams& chainparams, CTxMemPool
899
893
!CheckInputs (tx, stateDummy, view, true , scriptVerifyFlags & ~SCRIPT_VERIFY_CLEANSTACK, true , false , txdata)) {
900
894
// Only the witness is missing, so the transaction itself may be fine.
901
895
state.DoS (0 , ValidationInvalidReason::TX_WITNESS_MUTATED, false ,
902
- state.GetRejectCode (), state.GetRejectReason (), true , state.GetDebugMessage ());
896
+ state.GetRejectCode (), state.GetRejectReason (), true , state.GetDebugMessage ());
903
897
}
904
898
return false ; // state filled in by CheckInputs
905
899
}
@@ -1970,7 +1964,7 @@ bool CChainState::ConnectBlock(const CBlock& block, CValidationState& state, CBl
1970
1964
// CheckTxInputs may return MISSING_INPUTS but we can't return that, as
1971
1965
// it's not defined for a block, so we reset the reason flag to CONSENSUS here.
1972
1966
state.DoS (100 , ValidationInvalidReason::CONSENSUS, false ,
1973
- state.GetRejectCode (), state.GetRejectReason (), state.CorruptionPossible (), state.GetDebugMessage ());
1967
+ state.GetRejectCode (), state.GetRejectReason (), state.CorruptionPossible (), state.GetDebugMessage ());
1974
1968
}
1975
1969
return error (" %s: Consensus::CheckTxInputs: %s, %s" , __func__, tx.GetHash ().ToString (), FormatStateMessage (state));
1976
1970
}
0 commit comments