Added BlockTemplate tests
This commit is contained in:
@@ -23,7 +23,8 @@
|
||||
|
||||
namespace p2pool {
|
||||
|
||||
class p2pool;
|
||||
class SideChain;
|
||||
class RandomX_Hasher_Base;
|
||||
class Mempool;
|
||||
class Wallet;
|
||||
struct PoolBlock;
|
||||
@@ -32,7 +33,7 @@ struct MinerShare;
|
||||
class BlockTemplate
|
||||
{
|
||||
public:
|
||||
explicit BlockTemplate(p2pool* pool);
|
||||
explicit BlockTemplate(SideChain* sidechain, RandomX_Hasher_Base* hasher);
|
||||
~BlockTemplate();
|
||||
|
||||
BlockTemplate(const BlockTemplate& b);
|
||||
@@ -55,9 +56,11 @@ public:
|
||||
void submit_sidechain_block(uint32_t template_id, uint32_t nonce, uint32_t extra_nonce);
|
||||
|
||||
FORCEINLINE const std::vector<MinerShare>& shares() const { return m_shares; }
|
||||
FORCEINLINE const PoolBlock* pool_block_template() const { return m_poolBlockTemplate; }
|
||||
|
||||
private:
|
||||
p2pool* m_pool;
|
||||
SideChain* m_sidechain;
|
||||
RandomX_Hasher_Base* m_hasher;
|
||||
|
||||
private:
|
||||
int create_miner_tx(const MinerData& data, const std::vector<MinerShare>& shares, uint64_t max_reward_amounts_weight, bool dry_run);
|
||||
|
||||
Reference in New Issue
Block a user