mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Ledger header RPC enhancements (RIPD-692):
This combines two enhancements to the ledger_data RPC command and related commands. The ledger_data RPC command will now return the ledger header in the first query (the one with no marker specified). Also, ledger_data and related commands will now provide the ledger header in binary if binary output is specified. Modified existing ledgerdata unit test to cover new functionality.
This commit is contained in:
committed by
Nik Bougalis
parent
e00a6b0e5a
commit
a7c4d682d2
@@ -393,7 +393,7 @@ AmendmentTableImpl::doValidation (
|
||||
}
|
||||
}
|
||||
|
||||
if (!amendments.empty())
|
||||
if (! amendments.empty())
|
||||
std::sort (amendments.begin (), amendments.end ());
|
||||
|
||||
return amendments;
|
||||
@@ -402,26 +402,8 @@ AmendmentTableImpl::doValidation (
|
||||
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;
|
||||
// Get the list of amendments we support and do not veto
|
||||
return doValidation({});
|
||||
}
|
||||
|
||||
std::map <uint256, std::uint32_t>
|
||||
|
||||
Reference in New Issue
Block a user