mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-04-24 03:45:38 +08:00
use new get_mutable_data and put_mutable_data
This commit is contained in:
@@ -326,7 +326,7 @@ def store_mutable_data_to_storage( blockchain_id, data_id, data_txt, profile=Fal
|
||||
nocollide_data_id = '{}-{}'.format(blockchain_id, data_id)
|
||||
|
||||
log.debug("Store {} to drivers '{}', skipping '{}'".format('profile' if profile else 'mutable datum', ','.join(required if required is not None else []), ','.join(skip if skip is not None else [])))
|
||||
res = blockstack_client.storage.put_mutable_data(nocollide_data_id, data_txt, sign=False, required=required, skip=skip, blockchain_id=blockchain_id)
|
||||
res = blockstack_client.storage.put_mutable_data(nocollide_data_id, data_txt, raw=True, required=required, skip=skip, fqu=blockchain_id)
|
||||
return res
|
||||
|
||||
|
||||
@@ -334,10 +334,11 @@ def load_mutable_data_from_storage( blockchain_id, data_id, drivers=None ):
|
||||
"""
|
||||
Load mutable data from storage.
|
||||
Used by the storage gateway logic.
|
||||
Return
|
||||
Return the data on success
|
||||
Return None on error
|
||||
"""
|
||||
|
||||
nocollide_data_id = '{}-{}'.format(blockchain_id, data_id)
|
||||
res = blockstack_client.storage.get_mutable_data(nocollide_data_id, None, blockchain_id=blockchain_id, drivers=drivers, decode=False)
|
||||
res = blockstack_client.storage.get_mutable_data(nocollide_data_id, None, drivers=drivers, decode=False, fqu=blockchain_id)
|
||||
return res
|
||||
|
||||
|
||||
Reference in New Issue
Block a user