mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
Compare commits
No commits in common. "f0e7eb571e71c0129140908544da6e6027063a85" and "62360a30963b87beb6f84b4d713c5131ed3b0f95" have entirely different histories.
f0e7eb571e
...
62360a3096
@ -411,12 +411,6 @@ CQuorumPtr CQuorumManager::BuildQuorumFromCommitment(const Consensus::LLMQType l
|
||||
|
||||
quorum->Init(std::move(qc), pQuorumBaseBlockIndex, minedBlockHash, members);
|
||||
|
||||
if (populate_cache && llmq_params_opt->size == 1) {
|
||||
WITH_LOCK(cs_map_quorums, mapQuorumsCache[llmqType].insert(quorumHash, quorum));
|
||||
|
||||
return quorum;
|
||||
}
|
||||
|
||||
bool hasValidVvec = false;
|
||||
if (WITH_LOCK(cs_db, return quorum->ReadContributions(*db))) {
|
||||
hasValidVvec = true;
|
||||
|
@ -179,7 +179,7 @@ static RPCHelpMan quorum_list_extended()
|
||||
};
|
||||
}
|
||||
|
||||
static UniValue BuildQuorumInfo(const llmq::CQuorumBlockProcessor& quorum_block_processor, const llmq::CQuorumCPtr& quorum, bool includeMembers, bool includeSkShare, bool single_node_quorum = false)
|
||||
static UniValue BuildQuorumInfo(const llmq::CQuorumBlockProcessor& quorum_block_processor, const llmq::CQuorumCPtr& quorum, bool includeMembers, bool includeSkShare)
|
||||
{
|
||||
UniValue ret(UniValue::VOBJ);
|
||||
|
||||
@ -210,13 +210,9 @@ static UniValue BuildQuorumInfo(const llmq::CQuorumBlockProcessor& quorum_block_
|
||||
mo.pushKV("pubKeyOperator", dmn->pdmnState->pubKeyOperator.ToString());
|
||||
mo.pushKV("valid", quorum->qc->validMembers[i]);
|
||||
if (quorum->qc->validMembers[i]) {
|
||||
if (single_node_quorum) {
|
||||
mo.pushKV("pubKeyShare", dmn->pdmnState->pubKeyOperator.ToString());
|
||||
} else {
|
||||
CBLSPublicKey pubKey = quorum->GetPubKeyShare(i);
|
||||
if (pubKey.IsValid()) {
|
||||
mo.pushKV("pubKeyShare", pubKey.ToString());
|
||||
}
|
||||
CBLSPublicKey pubKey = quorum->GetPubKeyShare(i);
|
||||
if (pubKey.IsValid()) {
|
||||
mo.pushKV("pubKeyShare", pubKey.ToString());
|
||||
}
|
||||
}
|
||||
membersArr.push_back(mo);
|
||||
@ -229,14 +225,6 @@ static UniValue BuildQuorumInfo(const llmq::CQuorumBlockProcessor& quorum_block_
|
||||
if (includeSkShare && skShare.IsValid()) {
|
||||
ret.pushKV("secretKeyShare", skShare.ToString());
|
||||
}
|
||||
/*
|
||||
if (includeSkShare)
|
||||
const CBLSSecretKey& skShare = !single_node_quorum ? quorum->GetSkShare() : ????
|
||||
if (skShare.IsValid()) {
|
||||
ret.pushKV("secretKeyShare", skShare.ToString());
|
||||
}
|
||||
}
|
||||
*/
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -257,8 +245,7 @@ static RPCHelpMan quorum_info()
|
||||
const LLMQContext& llmq_ctx = EnsureLLMQContext(node);
|
||||
|
||||
const Consensus::LLMQType llmqType{static_cast<Consensus::LLMQType>(ParseInt32V(request.params[0], "llmqType"))};
|
||||
auto llmq_opt = Params().GetLLMQ(llmqType);
|
||||
if (!llmq_opt.has_value()) {
|
||||
if (!Params().GetLLMQ(llmqType).has_value()) {
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "invalid LLMQ type");
|
||||
}
|
||||
|
||||
@ -273,7 +260,7 @@ static RPCHelpMan quorum_info()
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "quorum not found");
|
||||
}
|
||||
|
||||
return BuildQuorumInfo(*llmq_ctx.quorum_block_processor, quorum, true, includeSkShare, llmq_opt->size == 1);
|
||||
return BuildQuorumInfo(*llmq_ctx.quorum_block_processor, quorum, true, includeSkShare);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user