mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Solve proof of works if requested.
This commit is contained in:
@@ -33,13 +33,15 @@ protected:
|
||||
static const int sMaxIterations;
|
||||
|
||||
public:
|
||||
typedef boost::shared_ptr<ProofOfWork> pointer;
|
||||
|
||||
ProofOfWork(const std::string& token, int iterations, const uint256& challenge, const uint256& target) :
|
||||
mToken(token), mChallenge(challenge), mTarget(target), mIterations(iterations)
|
||||
{ ; }
|
||||
|
||||
bool isValid() const;
|
||||
|
||||
uint256 solve(int maxIterations) const;
|
||||
uint256 solve(int maxIterations = 2 * sMaxIterations) const;
|
||||
bool checkSolution(const uint256& solution) const;
|
||||
|
||||
const std::string& getToken() const { return mToken; }
|
||||
|
||||
Reference in New Issue
Block a user