5ab43ff6d9
protocol_tx in submitted blocks. P2pool previously hardcoded an empty protocol_tx (0 outputs), causing block rejections with "Invalid number of outputs in protocol_tx". Now fetches the daemon's blocktemplate_blob via getblocktemplate RPC, parses out the real protocol_tx bytes, and uses them in the block template. Falls back to the empty protocol_tx when the RPC hasn't returned yet (correct for blocks with no payouts due).
12 lines
252 B
C++
12 lines
252 B
C++
#pragma once
|
|
|
|
#include "common.h"
|
|
#include <cstdint>
|
|
|
|
namespace p2pool {
|
|
|
|
void calculate_protocol_tx_hash(uint64_t height, hash& result);
|
|
void calculate_protocol_tx_hash_from_blob(const std::vector<uint8_t>& blob, hash& result);
|
|
|
|
} // namespace p2pool
|