Add object and chunk base impl and test cases

This commit is contained in:
liyaxing
2023-09-11 00:46:56 +08:00
parent e8e3812d28
commit 36476eb5b4
16 changed files with 385 additions and 125 deletions
+14
View File
@@ -0,0 +1,14 @@
from ..object import HashValue
from .chunk import ChunkID
from typing import List
class ChunkList:
def __init__(self, chunk_list: List[ChunkID], hash: HashValue):
self.chunk_list = chunk_list
self.hash = hash
def __str__(self):
return self.hash.to_base58()
def __repr__(self):
return f"chunk_list: {self.chunk_list}, hash: {self.hash}"