diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8b9f126..462979d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -28,4 +28,3 @@ with the repo to generate these mocks. [mockery](https://github.com/vektra/mocke - the `--name` and `--dir` indicate where the 'source' interface is to be mocked Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License. -s diff --git a/core/endorser/endorser.go b/core/endorser/endorser.go index 40f9ee5..6f85379 100644 --- a/core/endorser/endorser.go +++ b/core/endorser/endorser.go @@ -322,7 +322,7 @@ func (e *Endorser) ProcessProposal(ctx context.Context, signedProp *pb.SignedPro } // DRUNIX : do not install chaincode on committing-peer unless set explicitly using `CORE_PEER_INSTALLCCALLOWED=true` - isInstallCC := string(up.Input.Args[0]) == "InstallChaincode" + isInstallCC := len(up.Input.Args) > 0 && string(up.Input.Args[0]) == "InstallChaincode" if isInstallCC && !viper.GetBool("peer.litepeer.enabled") && !viper.GetBool("peer.installccallowed") { err := fmt.Errorf("Cannot install chaincode on committing-peer") endorserLogger.Warn(err.Error()) diff --git a/core/transientstore/keyvaluestore.go b/core/transientstore/keyvaluestore.go index 10a29db..4142ad8 100644 --- a/core/transientstore/keyvaluestore.go +++ b/core/transientstore/keyvaluestore.go @@ -350,10 +350,8 @@ func (s *KVStore) PrivateDataHGetAllBatch(keys map[string]string) (map[string]ma cmds[idx] = pipe.HGetAll(ctx, idx) } _, err := pipe.Exec(ctx) - if err != nil && err == redis.Nil { - logger.Errorf("error in retreiving PrivateDataHGetAllBatch value bytes : %+v", err) - } else if err != nil { - logger.Errorf("error executing PrivateDataHGetAllBatch pipeline :%v", err) + if err != nil && !errors.Is(err, redis.Nil) { + logger.Errorf("error executing PrivateDataHGetAllBatch pipeline: %v", err) return nil, err }