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

bugfix: python's api close was non-functional #1141

Merged
merged 2 commits into from
Nov 22, 2017

Conversation

hackaugusto
Copy link
Contributor

This fixes the python api close, add a regression test for that problem
and add general tests for it.

@hackaugusto
Copy link
Contributor Author

this supersedes #434 and fixes #1138

@LefterisJP
Copy link
Contributor

I am reviewing this one

Copy link
Contributor

@LefterisJP LefterisJP left a comment

Choose a reason for hiding this comment

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

Looks good to me. Some minor comments.

* :feature:`1097` Added `--gas-price` command line option
* :feature:`1038` Introduce an upper limit for the ``settle_timeout`` attribute of the netting channel
* :bug:`1044` Rename ``/connection`` API endpoint to ``/connections`` for consistency
* :bug:`1138` REST and Python API close did not working if a transfer was made.
Copy link
Contributor

Choose a reason for hiding this comment

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

working ->work

* :feature:`921` Add ``/api/1/connection`` API endpoint returning information about all connected token networks.
* :bug:`1011` Remove ``settled`` attribute from the NettingChannel smart contract.

* :release:`0.1.0 <2017-09-12>`
* :release:`0.1.0 <2017-09-12>`.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this appears as a section title in the changelog so it should not need a full stop at the end.

assert channel12.contract_balance == deposit
assert api1.get_channel_list(token_address, api2.address) == [channel12]

# there is a channel open, they must be checking each other
Copy link
Contributor

Choose a reason for hiding this comment

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

checking -> healthchecking <--- being kind of pedantic here but anyway ..

amount = 10
assert api1.transfer(token_address, amount, api2.address)

api1.close(token_address, api2.address)
Copy link
Contributor

Choose a reason for hiding this comment

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

as we discussed in the chat after you suggestions, add here more asserts after the close for the invariants of the channel state after close()

@LefterisJP
Copy link
Contributor

PR is approved. Merge as soon as tests pass.

This fixes the python api close, add a regression test for that problem
and add general tests for it.
@hackaugusto hackaugusto merged commit 7512ebe into raiden-network:master Nov 22, 2017
@hackaugusto hackaugusto deleted the raiden_api_test branch November 22, 2017 20:23
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.

2 participants