mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
pow-testgiver support
This commit is contained in:
parent
dbde9c1c40
commit
f064b1047a
257 changed files with 6665 additions and 2608 deletions
23
crypto/util/Miner.h
Normal file
23
crypto/util/Miner.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
#pragma once
|
||||
|
||||
#include "block/block.h"
|
||||
#include "td/utils/optional.h"
|
||||
#include "td/utils/Time.h"
|
||||
#include <atomic>
|
||||
#include <array>
|
||||
|
||||
namespace ton {
|
||||
class Miner {
|
||||
public:
|
||||
struct Options {
|
||||
block::StdAddress my_address;
|
||||
std::array<td::uint8, 16> seed;
|
||||
std::array<td::uint8, 32> complexity;
|
||||
td::optional<td::Timestamp> expire_at;
|
||||
td::int64 max_iterations = std::numeric_limits<td::int64>::max();
|
||||
std::atomic<td::uint64>* hashes_computed{nullptr};
|
||||
};
|
||||
|
||||
static td::optional<std::string> run(const Options& options);
|
||||
};
|
||||
} // namespace ton
|
Loading…
Add table
Add a link
Reference in a new issue