Add first leader to genesis (#1681)
* Add first leader to genesis entries, consume in genesis.sh * Set bootstrap leader in the bank on startup, remove instantiation of bootstrap leader from bin/fullnode * Remove need to initialize bootstrap leader in leader_scheduler, now can be read from genesis entries * Add separate interface new_with_leader() in mint for creating genesis leader entries
This commit is contained in:
@@ -1825,16 +1825,24 @@ mod tests {
|
||||
let obj = Arc::new(RwLock::new(cluster_info));
|
||||
|
||||
let request = Protocol::RequestUpdates(1, node.clone());
|
||||
assert!(
|
||||
ClusterInfo::handle_protocol(&obj, &node.contact_info.ncp, request, &window, &mut None,)
|
||||
.is_none()
|
||||
);
|
||||
assert!(ClusterInfo::handle_protocol(
|
||||
&obj,
|
||||
&node.contact_info.ncp,
|
||||
request,
|
||||
&window,
|
||||
&mut None,
|
||||
)
|
||||
.is_none());
|
||||
|
||||
let request = Protocol::RequestUpdates(1, node_with_same_addr.clone());
|
||||
assert!(
|
||||
ClusterInfo::handle_protocol(&obj, &node.contact_info.ncp, request, &window, &mut None,)
|
||||
.is_none()
|
||||
);
|
||||
assert!(ClusterInfo::handle_protocol(
|
||||
&obj,
|
||||
&node.contact_info.ncp,
|
||||
request,
|
||||
&window,
|
||||
&mut None,
|
||||
)
|
||||
.is_none());
|
||||
|
||||
let request = Protocol::RequestUpdates(1, node_with_diff_addr.clone());
|
||||
ClusterInfo::handle_protocol(&obj, &node.contact_info.ncp, request, &window, &mut None);
|
||||
|
||||
Reference in New Issue
Block a user