mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Function to get list of features supported by ledger.
This commit is contained in:
@@ -1327,6 +1327,18 @@ std::vector< std::pair<uint32, uint256> > Ledger::getLedgerHashes()
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boost::unordered_set<uint256> Ledger::getLedgerFeatures()
|
||||||
|
{
|
||||||
|
boost::unordered_set<uint256> usFeatures;
|
||||||
|
SLE::pointer sleFeatures = getSLEi(getLedgerFeatureIndex());
|
||||||
|
if (sleFeatures)
|
||||||
|
{
|
||||||
|
BOOST_FOREACH(const uint256& uFeature, sleFeatures->getFieldV256(sfFeatures).peekValue())
|
||||||
|
usFeatures.insert(uFeature);
|
||||||
|
}
|
||||||
|
return usFeatures;
|
||||||
|
}
|
||||||
|
|
||||||
// XRP to XRP not allowed.
|
// XRP to XRP not allowed.
|
||||||
// Currencies must have appropriate issuer.
|
// Currencies must have appropriate issuer.
|
||||||
// Currencies or accounts must differ.
|
// Currencies or accounts must differ.
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
|
#include <boost/unordered_set.hpp>
|
||||||
#include <boost/enable_shared_from_this.hpp>
|
#include <boost/enable_shared_from_this.hpp>
|
||||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||||
|
|
||||||
@@ -219,6 +220,7 @@ public:
|
|||||||
|
|
||||||
static uint256 getLedgerFeatureIndex();
|
static uint256 getLedgerFeatureIndex();
|
||||||
static uint256 getLedgerFeeIndex();
|
static uint256 getLedgerFeeIndex();
|
||||||
|
boost::unordered_set<uint256> getLedgerFeatures();
|
||||||
|
|
||||||
std::vector<uint256> getNeededTransactionHashes(int max, SHAMapSyncFilter* filter);
|
std::vector<uint256> getNeededTransactionHashes(int max, SHAMapSyncFilter* filter);
|
||||||
std::vector<uint256> getNeededAccountStateHashes(int max, SHAMapSyncFilter* filter);
|
std::vector<uint256> getNeededAccountStateHashes(int max, SHAMapSyncFilter* filter);
|
||||||
|
|||||||
Reference in New Issue
Block a user