From e41ff562181a4929516f003d19d68e7181632872 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Sun, 31 Dec 2023 00:26:59 -0300 Subject: [PATCH] update: node to require bytes to instantiate node class --- merkly/node.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/merkly/node.py b/merkly/node.py index 0931a19..3652a63 100644 --- a/merkly/node.py +++ b/merkly/node.py @@ -1,6 +1,6 @@ -from enum import Enum +from pydantic import BaseModel, StrictBytes from typing import Optional -from pydantic import BaseModel +from enum import Enum class Side(Enum): @@ -13,7 +13,7 @@ class Node(BaseModel): # 🍃 Leaf of Merkle Tree """ - data: Optional[bytes] = None + data: Optional[StrictBytes] = None side: Side = Side.LEFT def __eq__(self, other: "Node") -> bool: