Skip to content

Commit

Permalink
[FAB-14770] remove triggerNextState method
Browse files Browse the repository at this point in the history
Change-Id: I041273884ca8f77155a4d89d076253d13e387d1e
Signed-off-by: Matthew Sykes <sykesmat@us.ibm.com>
  • Loading branch information
sykesm committed Mar 27, 2019
1 parent e0144ab commit 00b0894
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions core/chaincode/shim/handler.go
Expand Up @@ -30,11 +30,6 @@ type PeerChaincodeStream interface {
CloseSend() error
}

func (h *Handler) triggerNextState(msg *pb.ChaincodeMessage, errc chan error) {
chaincodeLogger.Debugf("[%s] send state message %s", shorttxid(msg.Txid), msg.Type)
h.serialSendAsync(msg, errc)
}

// Handler handler implementation for shim side of chaincode.
type Handler struct {
//shim to peer grpc serializer. User only in serialSend
Expand Down Expand Up @@ -180,7 +175,7 @@ func (h *Handler) handleInit(msg *pb.ChaincodeMessage, errc chan error) {
var nextStateMsg *pb.ChaincodeMessage

defer func() {
h.triggerNextState(nextStateMsg, errc)
h.serialSendAsync(nextStateMsg, errc)
}()

errFunc := func(err error, payload []byte, ce *pb.ChaincodeEvent, errFmt string, args ...interface{}) *pb.ChaincodeMessage {
Expand Down Expand Up @@ -242,7 +237,7 @@ func (h *Handler) handleTransaction(msg *pb.ChaincodeMessage, errc chan error) {
var nextStateMsg *pb.ChaincodeMessage

defer func() {
h.triggerNextState(nextStateMsg, errc)
h.serialSendAsync(nextStateMsg, errc)
}()

errFunc := func(err error, ce *pb.ChaincodeEvent, errStr string, args ...interface{}) *pb.ChaincodeMessage {
Expand Down

0 comments on commit 00b0894

Please sign in to comment.