compare genesis during peering handshake (#327)
* wip - send genesis in handshake * error if genesis mismatch on handshake * fix the tests * preserve order of existing fields in hand/shake
This commit is contained in:
+2
-1
@@ -85,11 +85,12 @@ impl Server {
|
||||
capab: Capabilities,
|
||||
config: P2PConfig,
|
||||
adapter: Arc<ChainAdapter>,
|
||||
genesis: Hash,
|
||||
) -> Result<Server, Error> {
|
||||
Ok(Server {
|
||||
config: config,
|
||||
capabilities: capab,
|
||||
handshake: Arc::new(Handshake::new()),
|
||||
handshake: Arc::new(Handshake::new(genesis)),
|
||||
peers: Peers::new(PeerStore::new(db_root)?, adapter),
|
||||
stop: RefCell::new(None),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user