added missing test code

This commit is contained in:
Some Random Crypto Guy
2026-03-05 14:10:49 +00:00
parent 25dccd5423
commit a4e7ebc591
16 changed files with 399 additions and 201 deletions

View File

@@ -1136,45 +1136,3 @@ class Wallet(object):
'id': '0'
}
return self.rpc.send_json_rpc_request(frozen)
class BackgroundSyncOptions(object):
def __init__(self):
self.off = 'off'
self.reuse_password = 'reuse-wallet-password'
self.custom_password = 'custom-background-password'
background_sync_options = BackgroundSyncOptions()
def setup_background_sync(self, background_sync_type = background_sync_options.off, wallet_password = '', background_cache_password = ''):
setup_background_sync = {
'method': 'setup_background_sync',
'jsonrpc': '2.0',
'params' : {
'background_sync_type': background_sync_type,
'wallet_password': wallet_password,
'background_cache_password': background_cache_password,
},
'id': '0'
}
return self.rpc.send_json_rpc_request(setup_background_sync)
def start_background_sync(self):
start_background_sync = {
'method': 'start_background_sync',
'jsonrpc': '2.0',
'params' : {},
'id': '0'
}
return self.rpc.send_json_rpc_request(start_background_sync)
def stop_background_sync(self, wallet_password = '', seed = '', seed_offset = ''):
stop_background_sync = {
'method': 'stop_background_sync',
'jsonrpc': '2.0',
'params' : {
'wallet_password': wallet_password,
'seed': seed,
'seed_offset': seed_offset,
},
'id': '0'
}
return self.rpc.send_json_rpc_request(stop_background_sync)