mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-11-11 01:28:17 +03:00
Merge commit 'a221726770a736f87b34136d6456e063a985aa5d' into checkpoint/long_lived_atari_from_main_a221726770a736f87b34136d6456e063a985aa5d
This commit is contained in:
commit
361b27becb
@ -50,6 +50,9 @@ class PayloadType(Protocol):
|
||||
def __init__(self, identifier: PlotSyncIdentifier, *args: object) -> None:
|
||||
...
|
||||
|
||||
def __bytes__(self) -> bytes:
|
||||
pass
|
||||
|
||||
|
||||
T = TypeVar("T", bound=PayloadType)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
from dataclasses import dataclass
|
||||
from enum import IntEnum
|
||||
from typing import Any, Optional
|
||||
from typing import Optional, SupportsBytes, Union
|
||||
|
||||
from chia.protocols.protocol_message_types import ProtocolMessageTypes
|
||||
from chia.util.ints import uint8, uint16
|
||||
@ -42,5 +42,5 @@ class Message(Streamable):
|
||||
data: bytes
|
||||
|
||||
|
||||
def make_msg(msg_type: ProtocolMessageTypes, data: Any) -> Message:
|
||||
def make_msg(msg_type: ProtocolMessageTypes, data: Union[bytes, SupportsBytes]) -> Message:
|
||||
return Message(uint8(msg_type.value), None, bytes(data))
|
||||
|
Loading…
Reference in New Issue
Block a user