Skip to content

Commit

Permalink
review comments applied
Browse files Browse the repository at this point in the history
  • Loading branch information
levonpetrosyan93 committed May 9, 2024
1 parent 6c2c868 commit c1d2b5c
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/rpc/misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1459,17 +1459,12 @@ UniValue checkifmncollateral(const JSONRPCRequest& request)
CTransactionRef tx;
uint256 hashBlock;
if(!GetTransaction(txid, tx, Params().GetConsensus(), hashBlock, true))
throw std::runtime_error("Unable to get the transction");
throw std::runtime_error("Unknown transaction.");

auto mnList = deterministicMNManager->GetListAtChainTip();
COutPoint o(txid, index);

bool mnexists = false;
if (deterministicMNManager->IsProTxWithCollateral(tx, index) || mnList.HasMNByCollateral(o)) {
mnexists = true;
}

return UniValue(mnexists);
bool fMnExists = deterministicMNManager->IsProTxWithCollateral(tx, index) || mnList.HasMNByCollateral(o);
return UniValue(fMnExists);
}

UniValue getaddresstxids(const JSONRPCRequest& request)
Expand Down

0 comments on commit c1d2b5c

Please sign in to comment.