From daa8680da4bc57e7498dd2cd4b880c9f2bb369ad Mon Sep 17 00:00:00 2001 From: Alessandro Rezzi Date: Sun, 8 Jan 2023 13:31:14 +0100 Subject: [PATCH] Fix collateral used as input in ProRegTx --- src/qt/pivx/masternodewizarddialog.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qt/pivx/masternodewizarddialog.cpp b/src/qt/pivx/masternodewizarddialog.cpp index 4d13daba8f250..a12a2da981795 100644 --- a/src/qt/pivx/masternodewizarddialog.cpp +++ b/src/qt/pivx/masternodewizarddialog.cpp @@ -464,6 +464,7 @@ bool MasterNodeWizardDialog::createMN() // For now, collateral key is always inside the wallet std::string error_str; + walletModel->lockCoin(collateralOut); auto res = mnModel->createDMN(alias, collateralOut, ipAddress, @@ -476,6 +477,7 @@ bool MasterNodeWizardDialog::createMN() (uint16_t) operatorPercentage * 100, // operator percentage operatorPayoutKeyId); // operator payout script if (!res) { + walletModel->unlockCoin(collateralOut); return errorOut(tr(error_str.c_str())); }