Use getSLEi to get an immutable SLE. This lets us cache them.

This commit is contained in:
JoelKatz
2013-02-20 12:00:38 -08:00
parent ba37349b95
commit 25c52b1a4d
10 changed files with 35 additions and 13 deletions

View File

@@ -29,6 +29,7 @@
class RPCDoor;
class PeerDoor;
typedef TaggedCache< uint256, std::vector<unsigned char> > NodeCache;
typedef TaggedCache< uint256, SLE > SLECache;
class DatabaseCon
{
@@ -60,6 +61,7 @@ class Application
ValidationCollection mValidations;
SuppressionTable mSuppressions;
HashedObjectStore mHashedObjectStore;
SLECache mSLECache;
SNTPClient mSNTPClient;
JobQueue mJobQueue;
RPCHandler mRPCHandler;
@@ -118,6 +120,7 @@ public:
TXQueue& getTxnQueue() { return mTxnQueue; }
PeerDoor& getPeerDoor() { return *mPeerDoor; }
OrderBookDB& getOrderBookDB() { return mOrderBookDB; }
SLECache& getSLECache() { return mSLECache; }
bool isNew(const uint256& s) { return mSuppressions.addSuppression(s); }