mirror of
https://github.com/monero-project/monero.git
synced 2025-05-02 18:54:52 -04:00
Merge pull request #8619
e71c8bf
wallet: background sync with just the view key (j-berman)
This commit is contained in:
commit
d7eece3cae
20 changed files with 2340 additions and 132 deletions
|
@ -1153,3 +1153,45 @@ 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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue