Skip to content

Commit

Permalink
set_snapshot_checkwitness; 3.7.5.18
Browse files Browse the repository at this point in the history
  • Loading branch information
Hecate2 committed Oct 31, 2024
1 parent f2736c7 commit 0cea4e6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
16 changes: 13 additions & 3 deletions neo_fairy_client/rpc/fairy_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ def get_time_milliseconds(self) -> int:
def new_snapshots_from_current_system(self, fairy_sessions: Union[List[str], str] = None):
fairy_sessions = fairy_sessions or self.fairy_session
if fairy_sessions is None:
raise ValueError('No RpcServer session specified')
raise ValueError('No Fairy session specified')
if type(fairy_sessions) is str:
return self.meta_rpc_method("newsnapshotsfromcurrentsystem", [fairy_sessions])
return self.meta_rpc_method("newsnapshotsfromcurrentsystem", fairy_sessions)
Expand Down Expand Up @@ -715,7 +715,7 @@ def set_snapshot_timestamp(self, timestamp_ms: Union[int, None] = None, fairy_se
def get_snapshot_timestamp(self, fairy_sessions: Union[List[str], str, None] = None) -> Dict[str, int]:
fairy_sessions = fairy_sessions or self.fairy_session
if fairy_sessions is None:
raise ValueError('No RpcServer session specified')
raise ValueError('No Fairy session specified')
return self.meta_rpc_method("getsnapshottimestamp", to_list(fairy_sessions))

def set_snapshot_random(self, designated_random: Union[int, None], fairy_session: str = None) -> Dict[str, Union[int, None]]:
Expand All @@ -737,7 +737,17 @@ def get_snapshot_random(self, fairy_sessions: Union[List[str], str] = None) -> D
for k, v in result.items():
result[k] = None if not v else int(v)
return result


def set_snapshot_checkwitness(self, always_return_true: bool = True, fairy_session: str = None) -> Dict[str, int]:
fairy_session = fairy_session or self.fairy_session
return self.meta_rpc_method("setsnapshotcheckwitness", [fairy_session, always_return_true])

def get_snapshot_checkwitness(self, fairy_sessions: Union[List[str], str, None] = None) -> Dict[str, int]:
fairy_sessions = fairy_sessions or self.fairy_session
if fairy_sessions is None:
raise ValueError('No Fairy session specified')
return self.meta_rpc_method("getsnapshotcheckwitness", to_list(fairy_sessions))

def virtual_deploy(self, nef: bytes, manifest: str, data: Any = None, signers: Union[Signer, List[Signer]] = None, fairy_session: str = None) -> Hash160Str:
"""
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
long_description = fh.read()
setuptools.setup(
name="neo-fairy-client",
version="3.7.5.17",
version="3.7.5.18",
author="Hecate2",
author_email="[email protected]",
description="Test & debug your Neo3 smart contracts",
Expand Down

0 comments on commit 0cea4e6

Please sign in to comment.