mirror of
https://github.com/EvernodeXRPL/hpcore.git
synced 2026-04-29 15:37:59 +00:00
Ledger query infrastructure. (#275)
* Added json ledger query param parser. * Added initial query response creation. * Updated client lib. * Implemented get ledger by seq no. * Added ledger query execution wrappers. * Included log record info. * Fixed empty output hash issue. * Added bson support. * Added db file existance check. * Added requesy/reply tracking for queries in client lib. * Improved multi connection usage in client lib. * Added genesis ledger query support. * Updated naming convention of query result fields. * Comments. * Used sqlite bind() for query param. * Used binary hashes in ledger sqlite db. * Missing const.
This commit is contained in:
@@ -657,23 +657,20 @@ namespace consensus
|
||||
}
|
||||
}
|
||||
|
||||
if (!p.output_hash.empty())
|
||||
if (ctx.stage < 3)
|
||||
{
|
||||
if (ctx.stage < 3)
|
||||
// If the elected hash is our output hash, then place our output signature in the proposal.
|
||||
// We only do this if we are at stage 1 or 2.
|
||||
if (p.output_hash == ctx.user_outputs_hashtree.root_hash())
|
||||
p.output_sig = ctx.user_outputs_our_sig;
|
||||
}
|
||||
else
|
||||
{
|
||||
// If this is the stage 3 proposal, collect the UNL output signatures matching the elected output hash.
|
||||
for (const auto &[pubkey, cp] : ctx.candidate_proposals)
|
||||
{
|
||||
// If the elected hash is our output hash, then place our output signature in the proposal.
|
||||
// We only do this if we are at stage 1 or 2.
|
||||
if (p.output_hash == ctx.user_outputs_hashtree.root_hash())
|
||||
p.output_sig = ctx.user_outputs_our_sig;
|
||||
}
|
||||
else
|
||||
{
|
||||
// If this is the stage 3 proposal, collect the UNL output signatures matching the elected output hash.
|
||||
for (const auto &[pubkey, cp] : ctx.candidate_proposals)
|
||||
{
|
||||
if (cp.output_hash == p.output_hash)
|
||||
ctx.user_outputs_unl_sig.emplace_back(cp.pubkey, cp.output_sig);
|
||||
}
|
||||
if (cp.output_hash == p.output_hash)
|
||||
ctx.user_outputs_unl_sig.emplace_back(cp.pubkey, cp.output_sig);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user