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

Remove handling of ChannelNewDeposit event #496

Merged
merged 2 commits into from
Aug 1, 2019

Conversation

palango
Copy link
Contributor

@palango palango commented Aug 1, 2019

Handling the event turned out to be a source of issues. Besides, it
doesn't provide any advantages over just using the capacity updates from
the nodes.

This commit removes all internal handling of the deposit event.

Fixes #494

Handling the event turned out to be a source of issues. Besides, it
doesn't provide any advantages over just using the capacity updates from
the nodes.

This commit removes all internal handling of the deposit event.

Fixes raiden-network#494
@palango palango requested a review from karlb August 1, 2019 09:22
@codecov
Copy link

codecov bot commented Aug 1, 2019

Codecov Report

Merging #496 into master will increase coverage by 0.32%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #496      +/-   ##
==========================================
+ Coverage   90.71%   91.04%   +0.32%     
==========================================
  Files          35       35              
  Lines        2252     2211      -41     
  Branches      291      282       -9     
==========================================
- Hits         2043     2013      -30     
+ Misses        155      149       -6     
+ Partials       54       49       -5
Impacted Files Coverage Δ
src/pathfinding_service/service.py 90.71% <ø> (+0.03%) ⬆️
src/raiden_libs/blockchain.py 95.89% <ø> (+3.89%) ⬆️
src/pathfinding_service/model/token_network.py 96.66% <ø> (+3.37%) ⬆️
src/raiden_libs/events.py 100% <ø> (ø) ⬆️
src/pathfinding_service/database.py 100% <100%> (ø) ⬆️
src/pathfinding_service/model/channel_view.py 95.91% <100%> (+1.18%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 413a350...5ac3d72. Read the comment docs.

Copy link
Contributor

@karlb karlb left a comment

Choose a reason for hiding this comment

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

Great, this is more removed code than I expected!

tests/pathfinding/test_blockchain_integration.py Outdated Show resolved Hide resolved
@@ -112,7 +94,7 @@ def test_pfs_rejects_capacity_update_with_wrong_chain_id(
):
setup_channel(pathfinding_service_web3_mock)

message = get_updatepfs_message(
message = get_capacity_update_message(
Copy link
Contributor

Choose a reason for hiding this comment

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

Good that you changed that, too! I already though we got all the updatepfs occurrences last time...

@@ -99,7 +99,7 @@ def test_routing_simple(
view01: ChannelView = token_network_model.G[addresses[0]][addresses[1]]["view"]
view10: ChannelView = token_network_model.G[addresses[1]][addresses[0]]["view"]

assert view01.deposit == 100
# assert view01.deposit == 100
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not remove that line?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Classic, I was sure I would remember to remove this once the tests pass :-/

@palango palango merged commit 81634fc into raiden-network:master Aug 1, 2019
@palango palango deleted the remove-deposit-event branch August 1, 2019 09:50
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.

Remove handling of ChannelDeposit event
2 participants