mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-12 16:10:57 +00:00
Add more information to the peer mismatch exception
This commit is contained in:
@ -245,7 +245,12 @@ async def _establish_session_parameters(
|
|||||||
if not remote_peer:
|
if not remote_peer:
|
||||||
remote_peer = remote_peer_from_proposal
|
remote_peer = remote_peer_from_proposal
|
||||||
elif remote_peer != remote_peer_from_proposal:
|
elif remote_peer != remote_peer_from_proposal:
|
||||||
raise PeerMismatchException()
|
raise PeerMismatchException(
|
||||||
|
{
|
||||||
|
"expected_remote_peer": remote_peer,
|
||||||
|
"received_remote_peer": remote_peer_from_proposal,
|
||||||
|
}
|
||||||
|
)
|
||||||
session_parameters.remote_peer = remote_peer
|
session_parameters.remote_peer = remote_peer
|
||||||
|
|
||||||
curve_param, cipher_param, hash_param, order = _select_encryption_parameters(
|
curve_param, cipher_param, hash_param, order = _select_encryption_parameters(
|
||||||
|
|||||||
Reference in New Issue
Block a user