Skip to content

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

Merged
hackaugusto merged 2 commits intoraiden-network:masterfrom
hackaugusto:raiden_api_test
Nov 22, 2017
Merged

bugfix: python's api close was non-functional#1141
hackaugusto merged 2 commits intoraiden-network:masterfrom
hackaugusto:raiden_api_test

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

* :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