Do not vote if voting is disabled in config (#1078)
This commit is contained in:
parent
9f12f1bad9
commit
9d01f03dde
1 changed files with 2 additions and 2 deletions
|
@ -3757,7 +3757,7 @@ void rai::active_transactions::announce_votes ()
|
|||
// Broadcast winner
|
||||
if (node.ledger.could_fit (transaction, *election_l->status.winner))
|
||||
{
|
||||
if (std::chrono::system_clock::now () >= node.config.generate_hash_votes_at)
|
||||
if (node.config.enable_voting && std::chrono::system_clock::now () >= node.config.generate_hash_votes_at)
|
||||
{
|
||||
node.network.republish_block (transaction, election_l->status.winner, false);
|
||||
blocks_bundle.push_back (election_l->status.winner->hash ());
|
||||
|
@ -3828,7 +3828,7 @@ void rai::active_transactions::announce_votes ()
|
|||
++info_a.announcements;
|
||||
});
|
||||
}
|
||||
if (blocks_bundle.size () > 0)
|
||||
if (node.config.enable_voting && !blocks_bundle.empty ())
|
||||
{
|
||||
node.wallets.foreach_representative (transaction, [&](rai::public_key const & pub_a, rai::raw_key const & prv_a) {
|
||||
auto vote (this->node.store.vote_generate (transaction, pub_a, prv_a, blocks_bundle));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue