I have a chaincode with endorsement policy of -P 'OR (ORG1.peer, ORG2.peer)'
. when I invoke the chaincode using command peer chaincode invoke ...
it just accepts transaction proposal without any interruptions or waiting for endorsement. In other words: the endorsement logic
always returns true.
According to this part of documentation:
By default, endorsing logic at a peer accepts the tran-proposal and simply signs the tran-proposal. However, endorsing logic may interpret arbitrary functionality, to, e.g., interact with legacy systems with tran-proposal and tx as inputs to reach the decision whether to endorse a transaction or not.
Now I want to override this logic such that it listens on a port for an accept or reject message from an external application.
Is it possible?
If so, how can I do that?
Do I need to build my own docker image for fabric-peer?
Does my endorsement logic, waiting for an external call (ex. the administrator of organization)
makes any sense to real world fabric use cases?