mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 11:05:54 +00:00
The cache of IDs<->PubKeys. Also handles storing them to the SQL db.
This commit is contained in:
25
PubKeyCache.h
Normal file
25
PubKeyCache.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#ifndef __PUBKEYCACHE__
|
||||
#define __PUBKEYCACHE__
|
||||
|
||||
#include <map>
|
||||
|
||||
#include "boost/thread/mutex.hpp"
|
||||
|
||||
#include "uint256.h"
|
||||
#include "key.h"
|
||||
|
||||
class PubKeyCache
|
||||
{
|
||||
private:
|
||||
boost::mutex mLock;
|
||||
std::map<uint160,CKey::pointer> mCache;
|
||||
|
||||
public:
|
||||
PubKeyCache() { ; }
|
||||
|
||||
CKey::pointer locate(const uint160& id);
|
||||
void store(const uint160& id, CKey::pointer key);
|
||||
void clear(void);
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user