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())); }