mirror of
https://github.com/oxen-io/oxen-core.git
synced 2023-12-14 02:22:56 +01:00
Pulse: Check block has pulse components before seeding entropy
This commit is contained in:
parent
8391ebe961
commit
b359697e21
1 changed files with 2 additions and 1 deletions
|
@ -1649,7 +1649,8 @@ namespace service_nodes
|
|||
for (cryptonote::block const &block : blocks)
|
||||
{
|
||||
crypto::hash hash = {};
|
||||
if (block.major_version >= cryptonote::network_version_16)
|
||||
if (block.major_version >= cryptonote::network_version_16 &&
|
||||
cryptonote::block_has_pulse_components(block))
|
||||
{
|
||||
std::array<uint8_t, 1 + sizeof(block.pulse.random_value)> src = {pulse_round};
|
||||
std::copy(std::begin(block.pulse.random_value.data), std::end(block.pulse.random_value.data), src.begin() + 1);
|
||||
|
|
Loading…
Reference in a new issue