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

WIP TerminateAgreement endpoint #792

Closed
wants to merge 2 commits into from
Closed

Conversation

jiivan
Copy link
Contributor

@jiivan jiivan commented Nov 16, 2020

fixes: #727

Copy link
Contributor

@nieznanysprawiciel nieznanysprawiciel left a comment

Choose a reason for hiding this comment

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

It's ok.
You only need on_agreement_terminated implementation in negotiation/common.rs.

core/market/src/negotiation/requestor.rs Outdated Show resolved Hide resolved
counter!("market.agreements.requestor.terminated", 1);
log::info!(
"Requestor {} terminated Agreement [{}] and sent to Provider.",
DisplayIdentity(&id),
Copy link
Contributor

Choose a reason for hiding this comment

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

Note for future: in #754 you can do id.display()

Some(agreement) => agreement,
};

Err(match agreement.state {
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a note for future: We have such match on states in many places in code. Maybe we should refactor it somehow to remove duplication?

@jiivan jiivan force-pushed the market-decentralized/termag-ep branch 3 times, most recently from 4f12495 to 05ad9c0 Compare November 20, 2020 12:54
@nieznanysprawiciel
Copy link
Contributor

@jiivan Your branch must begin with market/ not market-decentralized/ to run our market test-suite tests.

@jiivan jiivan force-pushed the market-decentralized/termag-ep branch from 05ad9c0 to 1aa89e7 Compare November 23, 2020 15:00
@jiivan jiivan closed this Nov 26, 2020
@jiivan jiivan deleted the market-decentralized/termag-ep branch November 26, 2020 11:36
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.

Terminate Agreement endpoint
2 participants