Răsfoiți Sursa

consensus/state.rs: fixed participants insertion

aggstam 4 ani în urmă
părinte
comite
89606ee02a
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      src/consensus/state.rs

+ 1 - 1
src/consensus/state.rs

@@ -607,7 +607,7 @@ impl ValidatorState {
         if self.consensus.participants.is_empty() {
             // If no nodes are active, node becomes a single node network.
             let participant = Participant::new(self.id, self.current_epoch());
-            self.consensus.pending_participants.push(participant);
+            self.consensus.participants.insert(participant.id, participant.clone());
         }
     }