فهرست منبع

consensus/state.rs: fixed participants insertion

aggstam 4 سال پیش
والد
کامیت
89606ee02a
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  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());
         }
     }