Short nodes_ids and public_keys
This commit is contained in:
parent
21b1c853f5
commit
8a83f438d6
|
@ -19,6 +19,10 @@ class DispersalSettings:
|
||||||
class Dispersal:
|
class Dispersal:
|
||||||
def __init__(self, settings: DispersalSettings):
|
def __init__(self, settings: DispersalSettings):
|
||||||
self.settings = settings
|
self.settings = settings
|
||||||
|
# sort nodes_ids and related public keys
|
||||||
|
self.settings.nodes_ids, self.settings.nodes_pubkey = zip(
|
||||||
|
*sorted(zip(self.settings.nodes_ids, self.settings.nodes_pubkey), key=lambda x: x[0])
|
||||||
|
)
|
||||||
|
|
||||||
def _prepare_data(self, encoded_data: EncodedData) -> Generator[DABlob, None, None]:
|
def _prepare_data(self, encoded_data: EncodedData) -> Generator[DABlob, None, None]:
|
||||||
assert len(encoded_data.column_commitments) == len(self.settings.nodes_ids)
|
assert len(encoded_data.column_commitments) == len(self.settings.nodes_ids)
|
||||||
|
|
Loading…
Reference in New Issue