|
|
@ -26,7 +26,7 @@ class WorldState: |
|
|
|
def __init__( |
|
|
|
def __init__( |
|
|
|
self, |
|
|
|
self, |
|
|
|
transaction_sequence=None, |
|
|
|
transaction_sequence=None, |
|
|
|
annotations: List[StateAnnotation] = None, |
|
|
|
annotations: List[WSDependencyAnnotation] = None, |
|
|
|
constraints: Constraints = None, |
|
|
|
constraints: Constraints = None, |
|
|
|
) -> None: |
|
|
|
) -> None: |
|
|
|
"""Constructor for the world state. Initializes the accounts record. |
|
|
|
"""Constructor for the world state. Initializes the accounts record. |
|
|
@ -133,7 +133,7 @@ class WorldState: |
|
|
|
if self._check_constraint_merge(state.constraints) is False: |
|
|
|
if self._check_constraint_merge(state.constraints) is False: |
|
|
|
return False |
|
|
|
return False |
|
|
|
for v1, v2 in zip(state.annotations, self._annotations): |
|
|
|
for v1, v2 in zip(state.annotations, self._annotations): |
|
|
|
if v1.check_merge_annotation(v2) is False: # type: ignore |
|
|
|
if v1.check_merge_annotation(v2) is False: |
|
|
|
return False |
|
|
|
return False |
|
|
|
return True |
|
|
|
return True |
|
|
|
|
|
|
|
|
|
|
@ -144,7 +144,7 @@ class WorldState: |
|
|
|
:return: |
|
|
|
:return: |
|
|
|
""" |
|
|
|
""" |
|
|
|
for v1, v2 in zip(state.annotations, self._annotations): |
|
|
|
for v1, v2 in zip(state.annotations, self._annotations): |
|
|
|
v1.merge_annotations(v2) # type: ignore |
|
|
|
v1.merge_annotations(v2) |
|
|
|
|
|
|
|
|
|
|
|
def check_merge_condition(self, state: "WorldState"): |
|
|
|
def check_merge_condition(self, state: "WorldState"): |
|
|
|
""" |
|
|
|
""" |
|
|
|