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)
|
, mLedgerSeq (0)
|
||||||
, mState (smsModifying)
|
, mState (smsModifying)
|
||||||
, mType (t)
|
, mType (t)
|
||||||
|
, mTXMap (false)
|
||||||
, m_missing_node_handler (missing_node_handler)
|
, m_missing_node_handler (missing_node_handler)
|
||||||
{
|
{
|
||||||
assert (mSeq != 0);
|
assert (mSeq != 0);
|
||||||
@@ -51,6 +52,7 @@ SHAMap::SHAMap (SHAMapType t, uint256 const& hash, FullBelowCache& fullBelowCach
|
|||||||
, mLedgerSeq (0)
|
, mLedgerSeq (0)
|
||||||
, mState (smsSynching)
|
, mState (smsSynching)
|
||||||
, mType (t)
|
, mType (t)
|
||||||
|
, mTXMap (false)
|
||||||
, m_missing_node_handler (missing_node_handler)
|
, m_missing_node_handler (missing_node_handler)
|
||||||
{
|
{
|
||||||
if (t == smtSTATE)
|
if (t == smtSTATE)
|
||||||
@@ -933,7 +935,7 @@ SHAMapTreeNode* SHAMap::getNodeAsync (
|
|||||||
|
|
||||||
if (!ptr)
|
if (!ptr)
|
||||||
{
|
{
|
||||||
if (mType == smtTRANSACTION)
|
if (mTXMap)
|
||||||
{
|
{
|
||||||
// We don't store proposed transaction nodes in the node store
|
// We don't store proposed transaction nodes in the node store
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|||||||
@@ -270,6 +270,13 @@ public:
|
|||||||
treeNodeCache.setTargetAge (age);
|
treeNodeCache.setTargetAge (age);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setTXMap ()
|
||||||
|
{
|
||||||
|
mTXMap = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
typedef std::pair<uint256, SHAMapNode> TNIndex;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static TaggedCache <uint256, SHAMapTreeNode> treeNodeCache;
|
static TaggedCache <uint256, SHAMapTreeNode> treeNodeCache;
|
||||||
|
|
||||||
@@ -321,6 +328,7 @@ private:
|
|||||||
SHAMapTreeNode::pointer root;
|
SHAMapTreeNode::pointer root;
|
||||||
SHAMapState mState;
|
SHAMapState mState;
|
||||||
SHAMapType mType;
|
SHAMapType mType;
|
||||||
|
bool mTXMap; // Map of transactions without metadata
|
||||||
MissingNodeHandler m_missing_node_handler;
|
MissingNodeHandler m_missing_node_handler;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ TransactionAcquire::TransactionAcquire (uint256 const& hash, clock_type& clock)
|
|||||||
{
|
{
|
||||||
mMap = boost::make_shared<SHAMap> (smtTRANSACTION, hash,
|
mMap = boost::make_shared<SHAMap> (smtTRANSACTION, hash,
|
||||||
std::ref (getApp().getFullBelowCache ()));
|
std::ref (getApp().getFullBelowCache ()));
|
||||||
|
mMap->setTXMap ();
|
||||||
}
|
}
|
||||||
|
|
||||||
TransactionAcquire::~TransactionAcquire ()
|
TransactionAcquire::~TransactionAcquire ()
|
||||||
|
|||||||
Reference in New Issue
Block a user