mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
Fix -liquidityprovider option (#1829)
revert to pre-1248 logic for liquidity providers
This commit is contained in:
parent
e23861c0e4
commit
287d367c3c
@ -1002,6 +1002,16 @@ bool CPrivateSendClient::SubmitDenominate(CConnman& connman)
|
||||
std::vector<CTxOut> vecTxOutRet;
|
||||
|
||||
// Submit transaction to the pool if we get here
|
||||
if (nLiquidityProvider) {
|
||||
// Try to use only inputs with the same number of rounds starting from the lowest number of rounds possible
|
||||
for(int i = 0; i< nPrivateSendRounds; i++) {
|
||||
if(PrepareDenominate(i, i + 1, strError, vecTxDSInRet, vecTxOutRet)) {
|
||||
LogPrintf("CPrivateSendClient::SubmitDenominate -- Running PrivateSend denominate for %d rounds, success\n", i);
|
||||
return SendDenominate(vecTxDSInRet, vecTxOutRet, connman);
|
||||
}
|
||||
LogPrint("privatesend", "CPrivateSendClient::SubmitDenominate -- Running PrivateSend denominate for %d rounds, error: %s\n", i, strError);
|
||||
}
|
||||
} else {
|
||||
// Try to use only inputs with the same number of rounds starting from the highest number of rounds possible
|
||||
for(int i = nPrivateSendRounds; i > 0; i--) {
|
||||
if(PrepareDenominate(i - 1, i, strError, vecTxDSInRet, vecTxOutRet)) {
|
||||
@ -1010,6 +1020,7 @@ bool CPrivateSendClient::SubmitDenominate(CConnman& connman)
|
||||
}
|
||||
LogPrint("privatesend", "CPrivateSendClient::SubmitDenominate -- Running PrivateSend denominate for %d rounds, error: %s\n", i, strError);
|
||||
}
|
||||
}
|
||||
|
||||
// We failed? That's strange but let's just make final attempt and try to mix everything
|
||||
if(PrepareDenominate(0, nPrivateSendRounds, strError, vecTxDSInRet, vecTxOutRet)) {
|
||||
|
Loading…
Reference in New Issue
Block a user