Also check duplicate addresses for CProUpServTX in CTxMemPool
This commit is contained in:
parent
923fd67395
commit
8aca3b0404
@ -1094,12 +1094,18 @@ TxMempoolInfo CTxMemPool::info(const uint256& hash) const
|
|||||||
|
|
||||||
bool CTxMemPool::existsProviderTxConflict(const CTransaction &tx) const {
|
bool CTxMemPool::existsProviderTxConflict(const CTransaction &tx) const {
|
||||||
LOCK(cs);
|
LOCK(cs);
|
||||||
if (tx.nVersion < 3 || tx.nType != TRANSACTION_PROVIDER_REGISTER)
|
if (tx.nType == TRANSACTION_PROVIDER_REGISTER) {
|
||||||
return false;
|
|
||||||
CProRegTx proTx;
|
CProRegTx proTx;
|
||||||
if (!GetTxPayload(tx, proTx))
|
if (!GetTxPayload(tx, proTx))
|
||||||
assert(false);
|
assert(false);
|
||||||
return mapProTxAddresses.count(proTx.addr) || mapProTxPubKeyIDs.count(proTx.keyIDOwner) || mapProTxPubKeyIDs.count(proTx.keyIDOperator);
|
return mapProTxAddresses.count(proTx.addr) || mapProTxPubKeyIDs.count(proTx.keyIDOwner) || mapProTxPubKeyIDs.count(proTx.keyIDOperator);
|
||||||
|
} else if (tx.nType == TRANSACTION_PROVIDER_UPDATE_SERVICE) {
|
||||||
|
CProUpServTx proTx;
|
||||||
|
if (!GetTxPayload(tx, proTx))
|
||||||
|
assert(false);
|
||||||
|
return mapProTxAddresses.count(proTx.addr) && mapProTxAddresses[proTx.addr] != proTx.proTxHash;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
CFeeRate CTxMemPool::estimateFee(int nBlocks) const
|
CFeeRate CTxMemPool::estimateFee(int nBlocks) const
|
||||||
|
Loading…
Reference in New Issue
Block a user