-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#272 manage starage and holder accounts #274
Conversation
} | ||
} | ||
|
||
result = client._provider.make_request("getAccountInfo", str(storage_account), opts) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why you don't use client.get_account_info
implementation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It returns full accounts data, wich is massive
|
||
data = base64.b64decode(info['data'][0]) | ||
|
||
empty = True if data[0] == 0 else False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest returning the type of account (instead of the empty flag) here.
Rationale: we will change the Storage
account logic and empty storage will be in two cases Empty
and FinalizedStorage
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Changes:
new_acc_id_glob
andacc_list_glob
global variables for acquiring or creating storage and holder accounts.PermanentAccounts
creation prior iterative transaction execution.TransactionInfo
structure.TransactionInfo
structure.Storage/Holder accounts distribution and acquiring:
new_acc_id_glob
is used for generating new addresses.acc_list_glob
is used to store previously generated addresses that are not already in use.acc_list_glob
, it is taken from there. otherwise id got from incrementednew_acc_id_glob
.