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

Knots improvements #110

Merged
merged 5 commits into from
Jul 8, 2024
Merged

Knots improvements #110

merged 5 commits into from
Jul 8, 2024

Conversation

oldremez
Copy link
Collaborator

@oldremez oldremez commented Jul 7, 2024

  1. More knots are added to cover most of the state machine actions
  2. The error node is removed. Instead, conditions that fail transactions are changed into a parallelogram-type condition which fails transactions if a condition isn't met. As a bonus now we understand better if the state is changed in cases when we return to the previous state, it became more explicit
  3. Check ICQ freshness is removed. We can rely on the fact it's done every time we leave a state and adding that as a separate state will make both scheme and implementation much more complex
  4. Graph is prettified:
    image

Comment on lines 737 to 739
let (unbond_message_relut, unbond_attrs) =
get_unbonding_msg(deps.branch(), &env, config, &info)?;
if let Some(unbond_message) = unbond_message_relut {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
let (unbond_message_relut, unbond_attrs) =
get_unbonding_msg(deps.branch(), &env, config, &info)?;
if let Some(unbond_message) = unbond_message_relut {
let (unbond_message_result, unbond_attrs) =
get_unbonding_msg(deps.branch(), &env, config, &info)?;
if let Some(unbond_message) = unbond_message_result {

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Rewrote this code to pass by reference instead of returning it, looks cleaner

@ratik ratik merged commit 3c1ae86 into feat/knots Jul 8, 2024
22 checks passed
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