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

INDY-2097: update pluggable request handlers #1221

Merged

Conversation

Toktar
Copy link
Contributor

@Toktar Toktar commented May 30, 2019

Signed-off-by: toktar renata.toktar@dsr-corporation.com

Signed-off-by: toktar <renata.toktar@dsr-corporation.com>
@@ -52,9 +52,8 @@ def update_state(self, txn, prev_result, is_committed=False):
"""
pass

@abstractmethod
def gen_state_key(self, txn):
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we need to keep this method and use it as the main (primary) key in the state.
It needs to be abstract, so that every req handler must implement it.

Signed-off-by: toktar <renata.toktar@dsr-corporation.com>
Signed-off-by: toktar <renata.toktar@dsr-corporation.com>
Signed-off-by: toktar <renata.toktar@dsr-corporation.com>
Signed-off-by: toktar <renata.toktar@dsr-corporation.com>
Signed-off-by: toktar <renata.toktar@dsr-corporation.com>
Signed-off-by: toktar <renata.toktar@dsr-corporation.com>
@Toktar Toktar changed the title [WIP][ci skip][INDY-2097] update pluggable request handlers [WIP][INDY-2097] update pluggable request handlers May 31, 2019
from plenum.server.request_handlers.utils import is_trustee

MARKER_TAA = "2"
MARKER_TAA_AML = "3"
Copy link

Choose a reason for hiding this comment

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

please, move it into separate module with constants in the next PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

I would move every marker (for a txn type) into the corresponding WriteReqHandler.
Corresponding read req handlers (for this txn type) can get it from WriteReqHandlers (static method or constant).

lampkin-diet
lampkin-diet previously approved these changes Jun 4, 2019
Signed-off-by: toktar <renata.toktar@dsr-corporation.com>
@Toktar Toktar changed the title [WIP][INDY-2097] update pluggable request handlers INDY-2097: update pluggable request handlers Jun 4, 2019
from plenum.server.request_handlers.utils import is_trustee

MARKER_TAA = "2"
MARKER_TAA_AML = "3"
Copy link
Contributor

Choose a reason for hiding this comment

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

I would move every marker (for a txn type) into the corresponding WriteReqHandler.
Corresponding read req handlers (for this txn type) can get it from WriteReqHandlers (static method or constant).

@ashcherbakov ashcherbakov merged commit 65efad7 into hyperledger:master Jun 6, 2019
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.

None yet

3 participants