Skip to content

Commit 16c0238

Browse files
committed
Merge bitcoin#2530: [GUI][BUG] remove duplicated coll. confirmation check in MNModel::data
f0fd8ac Refactor: remove duplicated coll. confirmation check in MNModel::data (random-zebra) Pull request description: Follow up to the discussion in bitcoin#2529. If walletModel is null, then `MNModel::data` returns true at `WAS_COLLATERAL_ACCEPTED`. Fix the bug removing the duplicated check (`getWalletTxDepth > MasternodeCollateralMinConf()` is already checked every 30 seconds in `MNModel::updateMNList`). ACKs for top commit: furszy: utACK f0fd8ac Fuzzbawls: utACK f0fd8ac Tree-SHA512: 63065b4ae40403107d738d25ebf6616e99df4373b5fbe4d6b924fecddeef4189f455a91e1cbb48e8c85458481ab519420b49210d6e9f5284c6f35c6e53b35d4e
2 parents 5a64b27 + f0fd8ac commit 16c0238

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/qt/pivx/mnmodel.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,7 @@ QVariant MNModel::data(const QModelIndex &index, int role) const
106106
return "Not available";
107107
}
108108
case WAS_COLLATERAL_ACCEPTED:{
109-
if (!isAvailable) return false;
110-
std::string txHash = rec->vin.prevout.hash.GetHex();
111-
if (!collateralTxAccepted.value(txHash) && walletModel) {
112-
return walletModel->getWalletTxDepth(rec->vin.prevout.hash) > 0;
113-
}
114-
return true;
109+
return isAvailable && collateralTxAccepted.value(rec->vin.prevout.hash.GetHex());
115110
}
116111
}
117112
}

0 commit comments

Comments
 (0)