Skip to content

Commit

Permalink
Refactor: remove duplicated coll. confirmation check in MNModel::data
Browse files Browse the repository at this point in the history
Github-Pull: bitcoin#2530
Rebased-From: f0fd8ac
  • Loading branch information
random-zebra authored and furszy committed Sep 19, 2021
1 parent 2a947c0 commit 5f9aac4
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/qt/pivx/mnmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,7 @@ QVariant MNModel::data(const QModelIndex &index, int role) const
return "Not available";
}
case WAS_COLLATERAL_ACCEPTED:{
if (!isAvailable) return false;
std::string txHash = rec->vin.prevout.hash.GetHex();
if (!collateralTxAccepted.value(txHash) && walletModel) {
return walletModel->getWalletTxDepth(rec->vin.prevout.hash) > 0;
}
return true;
return isAvailable && collateralTxAccepted.value(rec->vin.prevout.hash.GetHex());
}
}
}
Expand Down

0 comments on commit 5f9aac4

Please sign in to comment.