Review UNL message rules. (#188)

This commit is contained in:
Savinda Senevirathne
2020-12-09 13:34:40 +05:30
committed by GitHub
parent fe9e276f8d
commit 0bc53fe23c
8 changed files with 37 additions and 25 deletions

View File

@@ -211,7 +211,7 @@ namespace consensus
// Start unl sync if we are out-of-sync with majority unl.
if (is_unl_desync)
{
conf::change_operating_mode(conf::OPERATING_MODE::OBSERVER);
conf::change_operating_mode(conf::OPERATING_MODE::OBSERVER);
unl::set_sync_target(majority_unl);
}
@@ -671,7 +671,7 @@ namespace consensus
void broadcast_proposal(const p2p::proposal &p)
{
// In observer mode, we do not send out proposals.
if (conf::cfg.operating_mode == conf::OPERATING_MODE::OBSERVER)
if (conf::cfg.operating_mode == conf::OPERATING_MODE::OBSERVER || !conf::cfg.is_unl) // If we are a non-unl node, do not broadcast proposals.
return;
flatbuffers::FlatBufferBuilder fbuf(1024);