24 #include <condition_variable> 68 using FullType = std::shared_ptr<FullAllocation>;
70 static h256 seedHash(
unsigned _number);
71 static uint64_t number(
h256 const& _seedHash);
72 static uint64_t cacheSize(
BlockHeader const& _header);
73 static uint64_t dataSize(uint64_t _blockNumber);
77 static const uint64_t NotGenerating = (uint64_t)-1;
79 static unsigned computeFull(
h256 const& _seedHash,
bool _createIfMissing =
true);
81 static std::pair<uint64_t, unsigned>
fullGeneratingProgress() {
return std::make_pair(
get()->m_generatingFullNumber,
get()->m_fullProgress); }
92 void killCache(
h256 const& _s);
97 std::unordered_map<h256, std::shared_ptr<LightAllocation>>
m_lights;
101 std::unordered_map<h256, std::weak_ptr<FullAllocation>>
m_fulls;
104 uint64_t m_generatingFullNumber = NotGenerating;
static const int verbosity
Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Origi...
#define function(a, b, c, d, k, s)
std::unordered_map< h256, std::shared_ptr< LightAllocation > > m_lights
std::shared_ptr< FullAllocation > FullType
static EthashAux * s_this
std::unordered_map< h256, std::weak_ptr< FullAllocation > > m_fulls
static std::pair< uint64_t, unsigned > fullGeneratingProgress()
Information on the generation progress.
std::unordered_map< h256, unsigned > m_epochs
std::shared_ptr< LightAllocation > LightType
std::condition_variable m_fullsChanged
uint64_t ethash_full_dag_size(ethash_full_t full)
Get the size of the DAG data.
std::unique_ptr< std::thread > m_fullGenerator
boost::shared_mutex SharedMutex
int(* ethash_callback_t)(unsigned)
The default logging channels.
static const char * name()
std::vector< h256 > h256s