mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-24 13:05:53 +00:00
Enable amendments in genesis ledger (RIPD-1281)
When started with "--start", put all known, non-vetoed amendments in the genesis ledger. This avoids the need to wait 256 ledgers before amendments are enabled when testing with a fresh ledger.
This commit is contained in:
@@ -199,6 +199,9 @@ public:
|
||||
std::vector <uint256>
|
||||
doValidation (std::set<uint256> const& enabledAmendments) override;
|
||||
|
||||
std::vector <uint256>
|
||||
getDesired () override;
|
||||
|
||||
std::map <uint256, std::uint32_t>
|
||||
doVoting (
|
||||
NetClock::time_point closeTime,
|
||||
@@ -396,6 +399,31 @@ AmendmentTableImpl::doValidation (
|
||||
return amendments;
|
||||
}
|
||||
|
||||
std::vector <uint256>
|
||||
AmendmentTableImpl::getDesired ()
|
||||
{
|
||||
// Get the list of amendments we support and do not
|
||||
// veto
|
||||
std::vector <uint256> amendments;
|
||||
amendments.reserve (amendmentMap_.size());
|
||||
|
||||
{
|
||||
std::lock_guard <std::mutex> sl (mutex_);
|
||||
for (auto const& e : amendmentMap_)
|
||||
{
|
||||
if (e.second.supported && ! e.second.vetoed)
|
||||
{
|
||||
amendments.push_back (e.first);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!amendments.empty())
|
||||
std::sort (amendments.begin (), amendments.end ());
|
||||
|
||||
return amendments;
|
||||
}
|
||||
|
||||
std::map <uint256, std::uint32_t>
|
||||
AmendmentTableImpl::doVoting (
|
||||
NetClock::time_point closeTime,
|
||||
|
||||
Reference in New Issue
Block a user