@@ -196,7 +196,7 @@ func (d *Devops) Deploy(ctx context.Context, spec *pb.ChaincodeSpec) (*pb.Chainc
196
196
}
197
197
resp := d .coord .ExecuteTransaction (tx )
198
198
if resp .Status == pb .Response_FAILURE {
199
- err = fmt . Errorf (string (resp .Msg ))
199
+ err = errors . New (string (resp .Msg ))
200
200
}
201
201
202
202
return chaincodeDeploymentSpec , err
@@ -205,7 +205,7 @@ func (d *Devops) Deploy(ctx context.Context, spec *pb.ChaincodeSpec) (*pb.Chainc
205
205
func (d * Devops ) invokeOrQuery (ctx context.Context , chaincodeInvocationSpec * pb.ChaincodeInvocationSpec , attributes []string , invoke bool ) (* pb.Response , error ) {
206
206
207
207
if chaincodeInvocationSpec .ChaincodeSpec .ChaincodeID .Name == "" {
208
- return nil , fmt . Errorf ("name not given for invoke/query" )
208
+ return nil , errors . New ("name not given for invoke/query" )
209
209
}
210
210
211
211
// Now create the Transactions message and send to Peer.
@@ -249,12 +249,10 @@ func (d *Devops) invokeOrQuery(ctx context.Context, chaincodeInvocationSpec *pb.
249
249
if err != nil {
250
250
return nil , err
251
251
}
252
- if devopsLogger .IsEnabledFor (logging .DEBUG ) {
253
- devopsLogger .Debugf ("Sending invocation transaction (%s) to validator" , transaction .Txid )
254
- }
252
+ devopsLogger .Debugf ("Sending invocation transaction (%s) to validator" , transaction .Txid )
255
253
resp := d .coord .ExecuteTransaction (transaction )
256
254
if resp .Status == pb .Response_FAILURE {
257
- err = fmt . Errorf (string (resp .Msg ))
255
+ err = errors . New (string (resp .Msg ))
258
256
} else {
259
257
if ! invoke && nil != sec && viper .GetBool ("security.privacy" ) {
260
258
if resp .Msg , err = sec .DecryptQueryResult (transaction , resp .Msg ); nil != err {
0 commit comments