Restore pool mining (#446)

This PR restores pool mining.

Co-authored-by: XfedeX <fedemar568@gmail.com>
Reviewed-on: https://git.wownero.com/wownero/wownero/pulls/446
Co-authored-by: _XxFedexX_ <_xxfedexx_@noreply.gitgud.wownero.nl>
Co-committed-by: _XxFedexX_ <_xxfedexx_@noreply.gitgud.wownero.nl>
This commit is contained in:
_XxFedexX_ 2023-01-23 05:15:40 +00:00 committed by w0wΔri0
parent 7c47b97984
commit 278f2f9968
7 changed files with 7 additions and 6 deletions

View file

@ -470,7 +470,7 @@ namespace cryptonote
VARINT_FIELD(timestamp) VARINT_FIELD(timestamp)
FIELD(prev_id) FIELD(prev_id)
FIELD(nonce) FIELD(nonce)
if (major_version >= BLOCK_HEADER_MINER_SIG) if (major_version >= BLOCK_HEADER_MINER_SIG && major_version < REMOVED_BLOCK_HEADER_MINER_SIG)
{ {
FIELD(signature) FIELD(signature)
FIELD(vote) FIELD(vote)

View file

@ -196,7 +196,7 @@ namespace boost
a & b.timestamp; a & b.timestamp;
a & b.prev_id; a & b.prev_id;
a & b.nonce; a & b.nonce;
if (b.major_version >= BLOCK_HEADER_MINER_SIG) if (b.major_version >= BLOCK_HEADER_MINER_SIG && b.major_version < REMOVED_BLOCK_HEADER_MINER_SIG)
{ {
a & b.signature; a & b.signature;
a & b.vote; a & b.vote;

View file

@ -609,7 +609,7 @@ namespace cryptonote
b.nonce = nonce; b.nonce = nonce;
// Miner Block Header Signing // Miner Block Header Signing
if (b.major_version >= BLOCK_HEADER_MINER_SIG) if (b.major_version >= BLOCK_HEADER_MINER_SIG && b.major_version < REMOVED_BLOCK_HEADER_MINER_SIG)
{ {
// tx key derivation // tx key derivation
crypto::key_derivation derivation; crypto::key_derivation derivation;

View file

@ -46,6 +46,7 @@
#define CURRENT_BLOCK_MAJOR_VERSION 7 #define CURRENT_BLOCK_MAJOR_VERSION 7
#define CURRENT_BLOCK_MINOR_VERSION 7 #define CURRENT_BLOCK_MINOR_VERSION 7
#define BLOCK_HEADER_MINER_SIG 18 #define BLOCK_HEADER_MINER_SIG 18
#define REMOVED_BLOCK_HEADER_MINER_SIG 20
#define CRYPTONOTE_BLOCK_FUTURE_TIME_LIMIT_V2 300*2 #define CRYPTONOTE_BLOCK_FUTURE_TIME_LIMIT_V2 300*2
#define CRYPTONOTE_BLOCK_FUTURE_TIME_LIMIT 60*60*2 #define CRYPTONOTE_BLOCK_FUTURE_TIME_LIMIT 60*60*2
#define CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE 4 #define CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE 4

View file

@ -1397,7 +1397,7 @@ difficulty_type Blockchain::get_next_difficulty_for_alternative_chain(const std:
bool Blockchain::prevalidate_miner_transaction(const block& b, uint64_t height, uint8_t hf_version) bool Blockchain::prevalidate_miner_transaction(const block& b, uint64_t height, uint8_t hf_version)
{ {
// Miner Block Header Signing // Miner Block Header Signing
if (hf_version >= BLOCK_HEADER_MINER_SIG) if (hf_version >= BLOCK_HEADER_MINER_SIG && hf_version < REMOVED_BLOCK_HEADER_MINER_SIG)
{ {
// sanity checks // sanity checks
if (b.miner_tx.vout.size() != 1) if (b.miner_tx.vout.size() != 1)

View file

@ -2192,7 +2192,7 @@ namespace cryptonote
return false; return false;
} }
b.nonce = req.starting_nonce; b.nonce = req.starting_nonce;
if (b.major_version >= BLOCK_HEADER_MINER_SIG) if (b.major_version >= BLOCK_HEADER_MINER_SIG && b.major_version < REMOVED_BLOCK_HEADER_MINER_SIG)
{ {
b.signature = {}; b.signature = {};
b.vote = 0; b.vote = 0;

View file

@ -895,7 +895,7 @@ namespace rpc
header.minor_version = b.minor_version; header.minor_version = b.minor_version;
header.timestamp = b.timestamp; header.timestamp = b.timestamp;
header.nonce = b.nonce; header.nonce = b.nonce;
if (b.major_version >= BLOCK_HEADER_MINER_SIG) if (b.major_version >= BLOCK_HEADER_MINER_SIG && b.major_version < REMOVED_BLOCK_HEADER_MINER_SIG)
{ {
header.signature = b.signature; header.signature = b.signature;
header.vote = b.vote; header.vote = b.vote;