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 AssertChannelSettledEvent #697

Merged

Conversation

ezdac
Copy link
Contributor

@ezdac ezdac commented Aug 24, 2021

Since the call-arguments for participant1 and participant2 are
unordered and the order is not enforced based on who calls the function,
both possibilities have to be checked when making assertions on
ChannelSettled events that are coop-settle related.
This commit introduces the AssertChannelSettledEvent task,
that allows for more advanced assertions related to ChannelSettled
events.

Addition: dependencies update

The pinned raiden and matrix-synapse versions as well as updates introduced by the poetry lock command were also updated in this PR - this causes the smokiest to fail due lack of a functioning PFS in the environment (#688).
The smoketest therefore was disabled in the CI.

Since the call-arguments for `participant1` and `participant2` are
unordered and the order is not enforced based on who calls the function,
both possibilities have to be checked when making assertions on
ChannelSettled events that are coop-settle related.
This commit introduces the `AssertChannelSettledEvent` task,
that allows for more advanced assertions related to ChannelSettled
events.
scenario_player/tasks/blockchain.py Outdated Show resolved Hide resolved
scenario_player/tasks/blockchain.py Outdated Show resolved Hide resolved
scenario_player/tasks/blockchain.py Outdated Show resolved Hide resolved
scenario_player/tasks/blockchain.py Outdated Show resolved Hide resolved
scenario_player/tasks/blockchain.py Outdated Show resolved Hide resolved
scenario_player/tasks/blockchain.py Outdated Show resolved Hide resolved
ezdac added 2 commits August 25, 2021 11:45
Before the integer values for the event attributes to be matched
weren't converted to int values, although the deserialized events
contain integer values. This caused the filter matching to fail
although the events were present onchain.
Now the expected attributes are converted from strings to integers.
@ezdac ezdac marked this pull request as ready for review August 25, 2021 12:55
@auto-assign auto-assign bot requested a review from karlb August 25, 2021 12:55
@ezdac ezdac requested review from palango and removed request for karlb August 25, 2021 12:55
@palango
Copy link
Contributor

palango commented Aug 25, 2021

A test would be nice. But I saw that there's none for AssertBlockchainEventsTask either.

@ezdac ezdac force-pushed the feature/channel_settled_assert_task branch from 40ae3c9 to e3c88ab Compare August 26, 2021 08:32
Querying blockchain events as well as filtering events
based on event_args had to be used in 2 tasks with differing
strictness on assertions regarding the `num_events`.
In order to separate validation of config arguments and
internal usage of the underlying functionality, a Mixin was used.
@ezdac ezdac force-pushed the feature/channel_settled_assert_task branch from 03e9630 to 9f3184e Compare August 26, 2021 08:45
@ezdac ezdac requested a review from istankovic August 26, 2021 08:47
@ezdac ezdac force-pushed the feature/channel_settled_assert_task branch from 9f3184e to 6209f98 Compare August 26, 2021 08:55
ezdac added 2 commits August 26, 2021 15:57
The dependencies have not been updated for quite some time.
With the updated raiden version, the smoketest require a functioning
PFS that returns the newly used metadata functionality.
Right now a simple PFS dummy server is started, that doesn't have this
functionality.
@ezdac ezdac force-pushed the feature/channel_settled_assert_task branch from 6209f98 to 89901e0 Compare August 26, 2021 13:59
@ezdac ezdac merged commit a806353 into raiden-network:master Aug 26, 2021
@ezdac ezdac deleted the feature/channel_settled_assert_task branch August 26, 2021 14:39
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.

4 participants