mirror of
https://github.com/logos-blockchain/logos-blockchain-specs.git
synced 2026-01-05 22:53:11 +00:00
fix
This commit is contained in:
parent
d3476d3ebb
commit
235c7031c9
@ -15,10 +15,10 @@ from pysphinx.sphinx import (
|
||||
from mixnet.config import GlobalConfig, NodeConfig
|
||||
from mixnet.packet import Fragment, MessageFlag, MessageReconstructor, PacketBuilder
|
||||
|
||||
NetworkPacket: TypeAlias = "SphinxPacket | bytes"
|
||||
NetworkPacketQueue: TypeAlias = "asyncio.Queue[NetworkPacket]"
|
||||
NetworkPacket: TypeAlias = SphinxPacket | bytes
|
||||
NetworkPacketQueue: TypeAlias = asyncio.Queue[NetworkPacket]
|
||||
Connection: TypeAlias = NetworkPacketQueue
|
||||
BroadcastChannel: TypeAlias = "asyncio.Queue[bytes]"
|
||||
BroadcastChannel: TypeAlias = asyncio.Queue[bytes]
|
||||
|
||||
|
||||
class Node:
|
||||
@ -47,8 +47,8 @@ class Node:
|
||||
return processed.next_packet
|
||||
case ProcessedFinalHopPacket():
|
||||
await self.__process_sphinx_payload(processed.payload)
|
||||
except Exception:
|
||||
# Return SphinxPacket as it is, if this node cannot unwrap it.
|
||||
except ValueError:
|
||||
# Return SphinxPacket as it is, if it cannot be unwrapped by the private key of this node.
|
||||
return packet
|
||||
|
||||
async def __process_sphinx_payload(self, payload: Payload):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user