-
Notifications
You must be signed in to change notification settings - Fork 366
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
INDY-2097: update pluggable request handlers #1221
Conversation
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): |
There was a problem hiding this comment.
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>
…nto task-2097-update-pluggable-handlers
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>
from plenum.server.request_handlers.utils import is_trustee | ||
|
||
MARKER_TAA = "2" | ||
MARKER_TAA_AML = "3" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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).
plenum/test/req_handler/test_get_txn_author_agreement_aml_handler.py
Outdated
Show resolved
Hide resolved
Signed-off-by: toktar <renata.toktar@dsr-corporation.com>
…nto task-2097-update-pluggable-handlers
from plenum.server.request_handlers.utils import is_trustee | ||
|
||
MARKER_TAA = "2" | ||
MARKER_TAA_AML = "3" |
There was a problem hiding this comment.
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).
Signed-off-by: toktar renata.toktar@dsr-corporation.com