mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
Make sure mixing masternode follows bip69 before signing final mixing tx (#1510)
* Make sure mixing tx follows bip69 before signing it * bump MIN_PRIVATESEND_PEER_PROTO_VERSION to 70208
This commit is contained in:
parent
502748487d
commit
ea793a71f1
@ -492,6 +492,18 @@ bool CPrivateSendClient::SignFinalTransaction(const CTransaction& finalTransacti
|
||||
finalMutableTransaction = finalTransactionNew;
|
||||
LogPrintf("CPrivateSendClient::SignFinalTransaction -- finalMutableTransaction=%s", finalMutableTransaction.ToString());
|
||||
|
||||
// Make sure it's BIP69 compliant
|
||||
sort(finalMutableTransaction.vin.begin(), finalMutableTransaction.vin.end(), CompareInputBIP69());
|
||||
sort(finalMutableTransaction.vout.begin(), finalMutableTransaction.vout.end(), CompareOutputBIP69());
|
||||
|
||||
if(finalMutableTransaction.GetHash() != finalTransactionNew.GetHash()) {
|
||||
LogPrintf("CPrivateSendClient::SignFinalTransaction -- WARNING! Masternode %s is not BIP69 compliant!\n", infoMixingMasternode.vin.prevout.ToStringShort());
|
||||
UnlockCoins();
|
||||
keyHolderStorage.ReturnAll();
|
||||
SetNull();
|
||||
return false;
|
||||
}
|
||||
|
||||
std::vector<CTxIn> sigs;
|
||||
|
||||
//make sure my inputs/outputs are present, otherwise refuse to sign
|
||||
|
@ -22,7 +22,7 @@ static const int PRIVATESEND_QUEUE_TIMEOUT = 30;
|
||||
static const int PRIVATESEND_SIGNING_TIMEOUT = 15;
|
||||
|
||||
//! minimum peer version accepted by mixing pool
|
||||
static const int MIN_PRIVATESEND_PEER_PROTO_VERSION = 70206;
|
||||
static const int MIN_PRIVATESEND_PEER_PROTO_VERSION = 70208;
|
||||
|
||||
static const CAmount PRIVATESEND_ENTRY_MAX_SIZE = 9;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user