Complete the fetch by hash logic, including tracking the hashes we want.

This commit is contained in:
JoelKatz
2013-01-04 22:14:53 -08:00
parent cb6f73cc89
commit dfbd640f6c
6 changed files with 71 additions and 7 deletions

View File

@@ -108,6 +108,9 @@ protected:
boost::unordered_set<InfoSub*> mSubTransactions; // all accepted transactions
boost::unordered_set<InfoSub*> mSubRTTransactions; // all proposed and accepted transactions
boost::recursive_mutex mWantedHashLock;
boost::unordered_set<uint256> mWantedHashes;
void setMode(OperatingMode);
Json::Value transJson(const SerializedTransaction& stTxn, TER terResult, bool bAccepted, Ledger::ref lpCurrent, const std::string& strType);
@@ -245,6 +248,9 @@ public:
void storeProposal(const LedgerProposal::pointer& proposal, const RippleAddress& peerPublic);
uint256 getConsensusLCL();
bool addWantedHash(const uint256& h);
bool isWantedHash(const uint256& h, bool remove);
// client information retrieval functions
std::vector< std::pair<Transaction::pointer, TransactionMetaSet::pointer> >
getAccountTxs(const RippleAddress& account, uint32 minLedger, uint32 maxLedger);