Skip to content

Commit

Permalink
coop settle: Don't emit ChannelClosed event
Browse files Browse the repository at this point in the history
  • Loading branch information
palango committed Jul 15, 2021
1 parent f61ed81 commit c7bae5c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
2 changes: 0 additions & 2 deletions raiden_contracts/data/source/raiden/TokenNetwork.sol
Original file line number Diff line number Diff line change
Expand Up @@ -559,8 +559,6 @@ contract TokenNetwork is Utils {
}
removeChannelData(channel, channel_identifier, data1.participant, data2.participant);

// Emit channel lifecycle events
emit ChannelClosed(channel_identifier, data1.participant, 0, 0);
emit ChannelSettled(channel_identifier, data1.total_withdraw, 0, data2.total_withdraw, 0);
}

Expand Down
9 changes: 1 addition & 8 deletions raiden_contracts/tests/test_channel_cooperative_settle.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@

from raiden_contracts.constants import EMPTY_ADDRESS, ChannelEvent
from raiden_contracts.tests.utils import call_and_transact
from raiden_contracts.utils.events import (
check_channel_closed,
check_channel_settled,
check_withdraw_2,
)
from raiden_contracts.utils.events import check_channel_settled, check_withdraw_2
from raiden_contracts.utils.type_aliases import BlockExpiration

EXPIRATION = BlockExpiration(100)
Expand Down Expand Up @@ -612,9 +608,6 @@ def test_cooperative_settle_channel_event(
assert any(map(check_withdraw_2(channel_identifier, A, balance_A), withdraw_events))
assert any(map(check_withdraw_2(channel_identifier, B, balance_B), withdraw_events))

ev_handler.add(
txn_hash, ChannelEvent.CLOSED, check_channel_closed(channel_identifier, B, 0, b"\x00" * 32)
)
ev_handler.add(
txn_hash,
ChannelEvent.SETTLED,
Expand Down

0 comments on commit c7bae5c

Please sign in to comment.