Dash related changes for feefilter
This commit is contained in:
parent
11ac70af9e
commit
aa584522da
@ -1205,7 +1205,9 @@ bool CTxLockCandidate::IsTimedOut() const
|
||||
|
||||
void CTxLockCandidate::Relay(CConnman& connman) const
|
||||
{
|
||||
connman.RelayTransaction(txLockRequest);
|
||||
CFeeRate txFeeRate;
|
||||
mempool.lookupFeeRate(txLockRequest.GetHash(), txFeeRate);
|
||||
connman.RelayTransaction(txLockRequest, txFeeRate);
|
||||
std::map<COutPoint, COutPointLock>::const_iterator itOutpointLock = mapOutPointLocks.begin();
|
||||
while(itOutpointLock != mapOutPointLocks.end()) {
|
||||
itOutpointLock->second.Relay(connman);
|
||||
|
@ -419,7 +419,7 @@ bool CPrivateSendClient::SendDenominate(const std::vector<CTxDSIn>& vecTxDSIn, c
|
||||
|
||||
mempool.PrioritiseTransaction(tx.GetHash(), tx.GetHash().ToString(), 1000, 0.1*COIN);
|
||||
TRY_LOCK(cs_main, lockMain);
|
||||
if(!lockMain || !AcceptToMemoryPool(mempool, validationState, CTransaction(tx), false, NULL, false, true, true)) {
|
||||
if(!lockMain || !AcceptToMemoryPool(mempool, validationState, CTransaction(tx), false, NULL, NULL, false, true, true)) {
|
||||
LogPrintf("CPrivateSendClient::SendDenominate -- AcceptToMemoryPool() failed! tx=%s", tx.ToString());
|
||||
UnlockCoins();
|
||||
keyHolderStorage.ReturnAll();
|
||||
|
@ -216,7 +216,7 @@ void CPrivateSendServer::ProcessMessage(CNode* pfrom, std::string& strCommand, C
|
||||
LOCK(cs_main);
|
||||
CValidationState validationState;
|
||||
mempool.PrioritiseTransaction(tx.GetHash(), tx.GetHash().ToString(), 1000, 0.1*COIN);
|
||||
if(!AcceptToMemoryPool(mempool, validationState, CTransaction(tx), false, NULL, false, true, true)) {
|
||||
if(!AcceptToMemoryPool(mempool, validationState, CTransaction(tx), false, NULL, NULL, false, true, true)) {
|
||||
LogPrintf("DSVIN -- transaction not valid! tx=%s", tx.ToString());
|
||||
PushStatus(pfrom, STATUS_REJECTED, ERR_INVALID_TX, connman);
|
||||
return;
|
||||
@ -343,7 +343,7 @@ void CPrivateSendServer::CommitFinalTransaction(CConnman& connman)
|
||||
TRY_LOCK(cs_main, lockMain);
|
||||
CValidationState validationState;
|
||||
mempool.PrioritiseTransaction(hashTx, hashTx.ToString(), 1000, 0.1*COIN);
|
||||
if(!lockMain || !AcceptToMemoryPool(mempool, validationState, finalTransaction, false, NULL, false, true, true))
|
||||
if(!lockMain || !AcceptToMemoryPool(mempool, validationState, finalTransaction, false, NULL, NULL, false, true, true))
|
||||
{
|
||||
LogPrintf("CPrivateSendServer::CommitFinalTransaction -- AcceptToMemoryPool() error: Transaction not valid\n");
|
||||
SetNull();
|
||||
@ -446,11 +446,12 @@ void CPrivateSendServer::ChargeFees(CConnman& connman)
|
||||
|
||||
CValidationState state;
|
||||
bool fMissingInputs;
|
||||
if(!AcceptToMemoryPool(mempool, state, vecOffendersCollaterals[0], false, &fMissingInputs, false, true)) {
|
||||
CFeeRate txFeeRate;
|
||||
if(!AcceptToMemoryPool(mempool, state, vecOffendersCollaterals[0], false, &fMissingInputs, &txFeeRate, false, true)) {
|
||||
// should never really happen
|
||||
LogPrintf("CPrivateSendServer::ChargeFees -- ERROR: AcceptToMemoryPool failed!\n");
|
||||
} else {
|
||||
connman.RelayTransaction(vecOffendersCollaterals[0]);
|
||||
connman.RelayTransaction(vecOffendersCollaterals[0], txFeeRate);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -481,11 +482,12 @@ void CPrivateSendServer::ChargeRandomFees(CConnman& connman)
|
||||
|
||||
CValidationState state;
|
||||
bool fMissingInputs;
|
||||
if(!AcceptToMemoryPool(mempool, state, txCollateral, false, &fMissingInputs, false, true)) {
|
||||
CFeeRate txFeeRate;
|
||||
if(!AcceptToMemoryPool(mempool, state, txCollateral, false, &fMissingInputs, &txFeeRate, false, true)) {
|
||||
// should never really happen
|
||||
LogPrintf("CPrivateSendServer::ChargeRandomFees -- ERROR: AcceptToMemoryPool failed!\n");
|
||||
} else {
|
||||
connman.RelayTransaction(txCollateral);
|
||||
connman.RelayTransaction(txCollateral, txFeeRate);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -213,7 +213,7 @@ bool CPrivateSend::IsCollateralValid(const CTransaction& txCollateral)
|
||||
{
|
||||
LOCK(cs_main);
|
||||
CValidationState validationState;
|
||||
if(!AcceptToMemoryPool(mempool, validationState, txCollateral, false, NULL, false, true, true)) {
|
||||
if(!AcceptToMemoryPool(mempool, validationState, txCollateral, false, NULL, NULL, false, true, true)) {
|
||||
LogPrint("privatesend", "CPrivateSend::IsCollateralValid -- didn't pass AcceptToMemoryPool()\n");
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user