Skip to content
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

add print_my_channels option for mpe-client #77

Merged
merged 2 commits into from
Oct 19, 2018

Conversation

astroseger
Copy link
Collaborator

Add print_my_channels option to mpe-client (print all channels which belongs to the client). This is the first element in stateless client logic.
Moreover I've added helper function to class BlockchainCommand: call_contract_command and transact_contract_command. Using this functions we can remove all ugly "ContractCommand" calls.


# return element of abi (return None if fails to find)
def abi_get_element_by_name(abi, name):
for a in abi["abi"]:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will "abi" key always be within abi dict?
If not or abi == None, this for loop will break.
I'd suggest use something like if abi and "abi" in abi:
Offtopic: There are too much off abi in this line...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done :)

@arturgontijo
Copy link
Contributor

Add print_my_channels option to mpe-client (print all channels which belongs to the client). This is the first element in stateless client logic.
Moreover I've added helper function to class BlockchainCommand: call_contract_command and transact_contract_command. Using this functions we can remove all ugly "ContractCommand" calls.

The call/transact_contract_command is a very good improvement!

@arturgontijo arturgontijo merged commit 0ed719d into singnet:master Oct 19, 2018
@astroseger astroseger deleted the mpe-stateless-client-1 branch October 19, 2018 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants