You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The endpoint in network-p2p module triggers an exception if it is empty when trying to get the network state by the console command.
The reason for this issue is that even though the endpoint was defined with a fixed length, if it is not initialized, it remains empty. Therefore, accessing it will still generate an exception.
Here's the translation of the code snippet:
network-p2p/src/service.rs:415
let endpoint = ifletSome(e) = swarm.behaviour_mut().node(peer_id).map(|i| i.endpoint()){
e.clone().into()}else{error!(target:"sub-libp2p","Found state inconsistency between custom protocol \and debug information about {:?}", peer_id);returnNone;};
network-p2p/peer_info.rs:142
pubstructNode<'a>(&'aNodeInfo);impl<'a>Node<'a>{/// Returns the endpoint of an established connection to the peer.pubfnendpoint(&self) -> &'aConnectedPoint{&self.0.endpoints[0]// `endpoints` are non-empty by definition}
The comment above said: endpoints are non-empty by definition but it will trigger an exception when accessing if no item was pushed.
Expected behavior:
Steps to reproduce:
Related code:
insert short code snippets here
Other information:
The text was updated successfully, but these errors were encountered:
* add network reconstruction for handshaking
* network construction
* process the unwrap
* fix test_handshake_message
* fix cargo fmt
* move derive and core from network-rpc to network-p2p
* fix fmt
* commit drive and core in network-p2p
* 1, rebase the master
2, resolve the compatibility issue
* move the stauts into the network module from the network-p2p module
* Add log and follow-up actions for protocol procedures
* test status in service_test.rs
* rebase network reconstruction
* network construction
* fix test_handshake_message
* fix cargo fmt
* move the stauts into the network module from the network-p2p module
* test status in service_test.rs
* fix fmt
* fix clippy
* fix fmt
* fix fmt
* fix fmt
* fix serde and fmt
* fix unittest in network-p2p
* fix clippy
* use 1.13.5
* fix:
1, add expect in upadte business status
2, handshake return the result struct hence decouple the relation of network-p2p and network modules
* fix bug: #3918
Bug Report
Starcoin version:
Current behavior:
The endpoint in network-p2p module triggers an exception if it is empty when trying to get the network state by the console command.
The reason for this issue is that even though the endpoint was defined with a fixed length, if it is not initialized, it remains empty. Therefore, accessing it will still generate an exception.
Here's the translation of the code snippet:
network-p2p/src/service.rs:415
network-p2p/peer_info.rs:142
The comment above said:
endpoints
are non-empty by definition but it will trigger an exception when accessing if no item was pushed.Expected behavior:
Steps to reproduce:
Related code:
Other information:
The text was updated successfully, but these errors were encountered: