Implement tx stream with history

This commit is contained in:
Peng Wang
2021-03-31 10:11:47 -04:00
committed by manojsdoshi
parent 00a4c3a478
commit e2a42184b9
7 changed files with 1203 additions and 67 deletions

View File

@@ -60,6 +60,9 @@ InfoSub::~InfoSub()
if (!normalSubscriptions_.empty())
m_source.unsubAccountInternal(mSeq, normalSubscriptions_, false);
for (auto const& account : accountHistorySubscriptions_)
m_source.unsubAccountHistoryInternal(mSeq, account, false);
}
Resource::Consumer&
@@ -101,6 +104,20 @@ InfoSub::deleteSubAccountInfo(AccountID const& account, bool rt)
normalSubscriptions_.erase(account);
}
bool
InfoSub::insertSubAccountHistory(AccountID const& account)
{
std::lock_guard sl(mLock);
return accountHistorySubscriptions_.insert(account).second;
}
void
InfoSub::deleteSubAccountHistory(AccountID const& account)
{
std::lock_guard sl(mLock);
accountHistorySubscriptions_.erase(account);
}
void
InfoSub::clearPathRequest()
{