Proof of work finding engine.

This commit is contained in:
JoelKatz
2012-11-12 15:55:58 -08:00
parent a6e709e5ff
commit 35905edd77
2 changed files with 73 additions and 18 deletions

View File

@@ -10,6 +10,15 @@
#include "uint256.h"
enum POWResult
{
powOK = 0,
powREUSED = 1,
powBADNONCE = 2,
powBADTOKEN = 3,
powEXPIRED = 4,
};
class ProofOfWork
{
protected:
@@ -48,6 +57,7 @@ protected:
int mIterations;
uint256 mTarget;
time_t mLastDifficultyChange;
int mValidTime;
powMap_t mSolvedChallenges;
boost::mutex mLock;
@@ -64,3 +74,5 @@ public:
};
#endif
// vim:ts=4