Drop Nx requirements for PS collaterals (#1995)
This commit is contained in:
parent
9e98c856f2
commit
4f978a2634
@ -306,14 +306,11 @@ bool CPrivateSend::IsCollateralValid(const CTransaction& txCollateral)
|
||||
bool CPrivateSend::IsCollateralAmount(CAmount nInputAmount)
|
||||
{
|
||||
if (mnpayments.GetMinMasternodePaymentsProto() > 70208) {
|
||||
// collateral input should be smth between 1x and 2x OR exactly Nx of mixing collateral (1x..4x)
|
||||
return (nInputAmount > GetCollateralAmount() && nInputAmount < GetCollateralAmount() * 2) ||
|
||||
(nInputAmount >= GetCollateralAmount() && nInputAmount <= GetMaxCollateralAmount() && nInputAmount % GetCollateralAmount() == 0);
|
||||
// collateral input can be anything between 1x and "max" (including both)
|
||||
return (nInputAmount >= GetCollateralAmount() && nInputAmount <= GetMaxCollateralAmount());
|
||||
} else { // <= 70208
|
||||
// collateral input should be exactly Nx of mixing collateral (2x..4x)
|
||||
return (nInputAmount >= GetCollateralAmount() * 2 &&
|
||||
nInputAmount <= GetMaxCollateralAmount() &&
|
||||
nInputAmount % GetCollateralAmount() == 0);
|
||||
// collateral input can be anything between 2x and "max" (including both)
|
||||
return (nInputAmount >= GetCollateralAmount() * 2 && nInputAmount <= GetMaxCollateralAmount());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user