Skip to content

Commit

Permalink
Improve wording of log message
Browse files Browse the repository at this point in the history
The log message that indicates which, if any, extra endorsers are required by the gateway is unclear.
This commit improves the wording.

Resolves hyperledger/fabric-gateway#203

Signed-off-by: andrew-coleman <andrew_coleman@uk.ibm.com>
  • Loading branch information
andrew-coleman authored and ale-linux committed Sep 28, 2021
1 parent 83cabf2 commit 210d20f
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions internal/pkg/gateway/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,14 +189,16 @@ func (gs *Server) Endorse(ctx context.Context, request *gp.EndorseRequest) (*gp.
}
}

gs.logger.Infow("Endorsement required from:", func() []interface{} {
var es []interface{}
for _, e := range endorsers {
es = append(es, e.mspid)
es = append(es, e.address)
}
return es
}()...)
if len(endorsers) > 0 {
gs.logger.Infow("Seeking extra endorsements from:", func() []interface{} {
var es []interface{}
for _, e := range endorsers {
es = append(es, e.mspid)
es = append(es, e.address)
}
return es
}()...)
}
}

var wg sync.WaitGroup
Expand Down

0 comments on commit 210d20f

Please sign in to comment.