mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-27 22:45:52 +00:00
Amendment RPC enhancements:
* RPC command to veto/unveto * Store votes * Add vote information to JSON * Add ledger majority information to JSON * Config section for vetos
This commit is contained in:
@@ -1401,11 +1401,28 @@ void LedgerConsensusImp::takeInitialPosition (
|
||||
&& ((mPreviousLedger->info().seq % 256) == 0))
|
||||
{
|
||||
// previous ledger was flag ledger, add pseudo-transactions
|
||||
ValidationSet parentSet = app_.getValidations().getValidations (
|
||||
mPreviousLedger->info().parentHash);
|
||||
m_feeVote.doVoting (mPreviousLedger, parentSet, initialSet);
|
||||
app_.getAmendmentTable ().doVoting (
|
||||
mPreviousLedger, parentSet, initialSet);
|
||||
auto const validations =
|
||||
app_.getValidations().getValidations (
|
||||
mPreviousLedger->info().parentHash);
|
||||
|
||||
auto const count = std::count_if (
|
||||
validations.begin(), validations.end(),
|
||||
[](auto const& v)
|
||||
{
|
||||
return v.second->isTrusted();
|
||||
});
|
||||
|
||||
if (count >= ledgerMaster_.getMinValidations())
|
||||
{
|
||||
m_feeVote.doVoting (
|
||||
mPreviousLedger,
|
||||
validations,
|
||||
initialSet);
|
||||
app_.getAmendmentTable ().doVoting (
|
||||
mPreviousLedger,
|
||||
validations,
|
||||
initialSet);
|
||||
}
|
||||
}
|
||||
|
||||
// Set should be immutable snapshot
|
||||
|
||||
Reference in New Issue
Block a user