mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 19:15:54 +00:00
Check the node store for transaction nodes with metadata
This commit is contained in:
committed by
Nik Bougalis
parent
f42ae3af21
commit
60787be80c
@@ -33,6 +33,7 @@ SHAMap::SHAMap (SHAMapType t, FullBelowCache& fullBelowCache, uint32 seq,
|
||||
, mLedgerSeq (0)
|
||||
, mState (smsModifying)
|
||||
, mType (t)
|
||||
, mTXMap (false)
|
||||
, m_missing_node_handler (missing_node_handler)
|
||||
{
|
||||
assert (mSeq != 0);
|
||||
@@ -51,6 +52,7 @@ SHAMap::SHAMap (SHAMapType t, uint256 const& hash, FullBelowCache& fullBelowCach
|
||||
, mLedgerSeq (0)
|
||||
, mState (smsSynching)
|
||||
, mType (t)
|
||||
, mTXMap (false)
|
||||
, m_missing_node_handler (missing_node_handler)
|
||||
{
|
||||
if (t == smtSTATE)
|
||||
@@ -933,7 +935,7 @@ SHAMapTreeNode* SHAMap::getNodeAsync (
|
||||
|
||||
if (!ptr)
|
||||
{
|
||||
if (mType == smtTRANSACTION)
|
||||
if (mTXMap)
|
||||
{
|
||||
// We don't store proposed transaction nodes in the node store
|
||||
return nullptr;
|
||||
|
||||
@@ -270,6 +270,13 @@ public:
|
||||
treeNodeCache.setTargetAge (age);
|
||||
}
|
||||
|
||||
void setTXMap ()
|
||||
{
|
||||
mTXMap = true;
|
||||
}
|
||||
|
||||
typedef std::pair<uint256, SHAMapNode> TNIndex;
|
||||
|
||||
private:
|
||||
static TaggedCache <uint256, SHAMapTreeNode> treeNodeCache;
|
||||
|
||||
@@ -321,6 +328,7 @@ private:
|
||||
SHAMapTreeNode::pointer root;
|
||||
SHAMapState mState;
|
||||
SHAMapType mType;
|
||||
bool mTXMap; // Map of transactions without metadata
|
||||
MissingNodeHandler m_missing_node_handler;
|
||||
};
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ TransactionAcquire::TransactionAcquire (uint256 const& hash, clock_type& clock)
|
||||
{
|
||||
mMap = boost::make_shared<SHAMap> (smtTRANSACTION, hash,
|
||||
std::ref (getApp().getFullBelowCache ()));
|
||||
mMap->setTXMap ();
|
||||
}
|
||||
|
||||
TransactionAcquire::~TransactionAcquire ()
|
||||
|
||||
Reference in New Issue
Block a user