Skip to content

Commit

Permalink
Revert "rpc: require proTxHash to be unspecified when not asking fo…
Browse files Browse the repository at this point in the history
…r `ENCRYPTED_CONTRIBUTIONS` in `quorum getdata` rpc"

This reverts commit c5a66ff.
  • Loading branch information
UdjinM6 committed Dec 17, 2023
1 parent dd7abef commit 024691e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/rpc/quorums.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -720,8 +720,8 @@ static UniValue quorum_getdata(const JSONRPCRequest& request, const LLMQContext&
uint16_t nDataMask = static_cast<uint16_t>(ParseInt32V(request.params[3], "dataMask"));
uint256 proTxHash;

// Check if request wants ENCRYPTED_CONTRIBUTIONS data
if (nDataMask & llmq::CQuorumDataRequest::ENCRYPTED_CONTRIBUTIONS) {
// Require proTxHash if request wants ENCRYPTED_CONTRIBUTIONS data
if (!request.params[4].isNull()) {
proTxHash = ParseHashV(request.params[4], "proTxHash");
if (proTxHash.IsNull()) {
Expand All @@ -730,9 +730,6 @@ static UniValue quorum_getdata(const JSONRPCRequest& request, const LLMQContext&
} else {
throw JSONRPCError(RPC_INVALID_PARAMETER, "proTxHash missing");
}
} else if (!request.params[4].isNull()) {
// Require no proTxHash otherwise
throw JSONRPCError(RPC_INVALID_PARAMETER, "Should not specify proTxHash");
}

const CBlockIndex* pQuorumBaseBlockIndex = WITH_LOCK(cs_main, return chainman.m_blockman.LookupBlockIndex(quorumHash));
Expand Down

0 comments on commit 024691e

Please sign in to comment.