mirror of
https://codeberg.org/nahuhh/wownero
synced 2026-11-18 12:44:07 +01:00
switch to SHA-3 PoW
Co-authored-by: fuwa <fuwa0529@users.noreply.github.com>
This commit is contained in:
@@ -449,14 +449,26 @@ namespace cryptonote
|
||||
uint8_t minor_version; // now used as a voting mechanism, rather than how this particular block is built
|
||||
uint64_t timestamp;
|
||||
crypto::hash prev_id;
|
||||
uint32_t nonce;
|
||||
uint64_t nonce;
|
||||
|
||||
BEGIN_SERIALIZE()
|
||||
VARINT_FIELD(major_version)
|
||||
VARINT_FIELD(minor_version)
|
||||
VARINT_FIELD(timestamp)
|
||||
FIELD(prev_id)
|
||||
FIELD(nonce)
|
||||
if (major_version >= HF_VERSION_SHA3_POW)
|
||||
{
|
||||
FIELD(nonce)
|
||||
}
|
||||
else
|
||||
{
|
||||
uint32_t nonce32;
|
||||
if (typename Archive<W>::is_saving())
|
||||
nonce32 = (uint32_t)nonce;
|
||||
FIELD_N("nonce", nonce32);
|
||||
if (!typename Archive<W>::is_saving())
|
||||
nonce = nonce32;
|
||||
}
|
||||
END_SERIALIZE()
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user