Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.25.10"
- name: Staticcheck
run: make staticcheck
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
uses: golangci/golangci-lint-action@v9
with:
version: latest
version: v2.9.0
skip-cache: true
problem-matchers: true
- name: Unit test
run: make unit-test
26 changes: 15 additions & 11 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
# See https://golangci-lint.run/usage/configuration/

version: "2"
run:
timeout: 5m
concurrency: 4
go: "1.25"

linters:
disable-all: true
default: none
enable:
- errcheck
- gofmt
- goimports
- gosec
- gosimple
- staticcheck
- govet
- ineffassign
- misspell
- typecheck
- unused
linters-settings:
gosec:
excludes:
- 'G115' # safe to exclude type conversion overflow checks in this repository since the integer values will always be low
settings:
gosec:
excludes:
- G115 # safe to exclude type conversion overflow checks in this repository since the integer values will always be low
formatters:
enable:
- gci
- gofmt
- gofumpt
- goimports
12 changes: 6 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
module github.com/hyperledger/fabric-chaincode-go/v2

go 1.24.0
go 1.25.10

require (
github.com/hyperledger/fabric-protos-go-apiv2 v0.3.7
github.com/stretchr/testify v1.11.1
google.golang.org/grpc v1.80.0
google.golang.org/grpc v1.81.1
google.golang.org/protobuf v1.36.11
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/net v0.49.0 // indirect
golang.org/x/sys v0.40.0 // indirect
golang.org/x/text v0.33.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260120221211-b8f7ae30c516 // indirect
golang.org/x/net v0.54.0 // indirect
golang.org/x/sys v0.44.0 // indirect
golang.org/x/text v0.37.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260511170946-3700d4141b60 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
40 changes: 20 additions & 20 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -27,28 +27,28 @@ github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=
go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y=
go.opentelemetry.io/otel v1.39.0 h1:8yPrr/S0ND9QEfTfdP9V+SiwT4E0G7Y5MO7p85nis48=
go.opentelemetry.io/otel v1.39.0/go.mod h1:kLlFTywNWrFyEdH0oj2xK0bFYZtHRYUdv1NklR/tgc8=
go.opentelemetry.io/otel/metric v1.39.0 h1:d1UzonvEZriVfpNKEVmHXbdf909uGTOQjA0HF0Ls5Q0=
go.opentelemetry.io/otel/metric v1.39.0/go.mod h1:jrZSWL33sD7bBxg1xjrqyDjnuzTUB0x1nBERXd7Ftcs=
go.opentelemetry.io/otel/sdk v1.39.0 h1:nMLYcjVsvdui1B/4FRkwjzoRVsMK8uL/cj0OyhKzt18=
go.opentelemetry.io/otel/sdk v1.39.0/go.mod h1:vDojkC4/jsTJsE+kh+LXYQlbL8CgrEcwmt1ENZszdJE=
go.opentelemetry.io/otel/sdk/metric v1.39.0 h1:cXMVVFVgsIf2YL6QkRF4Urbr/aMInf+2WKg+sEJTtB8=
go.opentelemetry.io/otel/sdk/metric v1.39.0/go.mod h1:xq9HEVH7qeX69/JnwEfp6fVq5wosJsY1mt4lLfYdVew=
go.opentelemetry.io/otel/trace v1.39.0 h1:2d2vfpEDmCJ5zVYz7ijaJdOF59xLomrvj7bjt6/qCJI=
go.opentelemetry.io/otel/trace v1.39.0/go.mod h1:88w4/PnZSazkGzz/w84VHpQafiU4EtqqlVdxWy+rNOA=
golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o=
golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8=
golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ=
golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE=
golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8=
go.opentelemetry.io/otel v1.43.0 h1:mYIM03dnh5zfN7HautFE4ieIig9amkNANT+xcVxAj9I=
go.opentelemetry.io/otel v1.43.0/go.mod h1:JuG+u74mvjvcm8vj8pI5XiHy1zDeoCS2LB1spIq7Ay0=
go.opentelemetry.io/otel/metric v1.43.0 h1:d7638QeInOnuwOONPp4JAOGfbCEpYb+K6DVWvdxGzgM=
go.opentelemetry.io/otel/metric v1.43.0/go.mod h1:RDnPtIxvqlgO8GRW18W6Z/4P462ldprJtfxHxyKd2PY=
go.opentelemetry.io/otel/sdk v1.43.0 h1:pi5mE86i5rTeLXqoF/hhiBtUNcrAGHLKQdhg4h4V9Dg=
go.opentelemetry.io/otel/sdk v1.43.0/go.mod h1:P+IkVU3iWukmiit/Yf9AWvpyRDlUeBaRg6Y+C58QHzg=
go.opentelemetry.io/otel/sdk/metric v1.43.0 h1:S88dyqXjJkuBNLeMcVPRFXpRw2fuwdvfCGLEo89fDkw=
go.opentelemetry.io/otel/sdk/metric v1.43.0/go.mod h1:C/RJtwSEJ5hzTiUz5pXF1kILHStzb9zFlIEe85bhj6A=
go.opentelemetry.io/otel/trace v1.43.0 h1:BkNrHpup+4k4w+ZZ86CZoHHEkohws8AY+WTX09nk+3A=
go.opentelemetry.io/otel/trace v1.43.0/go.mod h1:/QJhyVBUUswCphDVxq+8mld+AvhXZLhe+8WVFxiFff0=
golang.org/x/net v0.54.0 h1:2zJIZAxAHV/OHCDTCOHAYehQzLfSXuf/5SoL/Dv6w/w=
golang.org/x/net v0.54.0/go.mod h1:Sj4oj8jK6XmHpBZU/zWHw3BV3abl4Kvi+Ut7cQcY+cQ=
golang.org/x/sys v0.44.0 h1:ildZl3J4uzeKP07r2F++Op7E9B29JRUy+a27EibtBTQ=
golang.org/x/sys v0.44.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
golang.org/x/text v0.37.0 h1:Cqjiwd9eSg8e0QAkyCaQTNHFIIzWtidPahFWR83rTrc=
golang.org/x/text v0.37.0/go.mod h1:a5sjxXGs9hsn/AJVwuElvCAo9v8QYLzvavO5z2PiM38=
gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4=
gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260120221211-b8f7ae30c516 h1:sNrWoksmOyF5bvJUcnmbeAmQi8baNhqg5IWaI3llQqU=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260120221211-b8f7ae30c516/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ=
google.golang.org/grpc v1.80.0 h1:Xr6m2WmWZLETvUNvIUmeD5OAagMw3FiKmMlTdViWsHM=
google.golang.org/grpc v1.80.0/go.mod h1:ho/dLnxwi3EDJA4Zghp7k2Ec1+c2jqup0bFkw07bwF4=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260511170946-3700d4141b60 h1:seT2EwLWM78plQ7wcDfuWBc/4FAEAXDDiaSol4ku4qo=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260511170946-3700d4141b60/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8=
google.golang.org/grpc v1.81.1 h1:VnnIIZ88UzOOKLukQi+ImGz8O1Wdp8nAGGnvOfEIWQQ=
google.golang.org/grpc v1.81.1/go.mod h1:xGH9GfzOyMTGIOXBJmXt+BX/V0kcdQbdcuwQ/zNw42I=
google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=
google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
16 changes: 11 additions & 5 deletions pkg/cid/cid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ KoZIzj0EAwIDRwAwRAIgCoXaCdU8ZiRKkai0QiXJM/GL5fysLnmG2oZ6XOIdwtsC
IEmCsI8Mhrvx1doTbEOm7kmIrhQwUVDBNXCWX1t3kJVN
-----END CERTIFICATE-----
`

const certWithAttrs = `-----BEGIN CERTIFICATE-----
MIIB6TCCAY+gAwIBAgIUHkmY6fRP0ANTvzaBwKCkMZZPUnUwCgYIKoZIzj0EAwIw
GzEZMBcGA1UEAxMQZmFicmljLWNhLXNlcnZlcjAeFw0xNzA5MDgwMzQyMDBaFw0x
Expand Down Expand Up @@ -133,8 +134,10 @@ func TestIdemix(t *testing.T) {

func getMockStub() (cid.ChaincodeStubInterface, error) {
stub := &mockStub{}
sid := &msp.SerializedIdentity{Mspid: "SampleOrg",
IdBytes: []byte(certWithOutAttrs)}
sid := &msp.SerializedIdentity{
Mspid: "SampleOrg",
IdBytes: []byte(certWithOutAttrs),
}
b, err := proto.Marshal(sid)
if err != nil {
return nil, err
Expand All @@ -145,8 +148,10 @@ func getMockStub() (cid.ChaincodeStubInterface, error) {

func getMockStubWithAttrs() (cid.ChaincodeStubInterface, error) {
stub := &mockStub{}
sid := &msp.SerializedIdentity{Mspid: "SampleOrg",
IdBytes: []byte(certWithAttrs)}
sid := &msp.SerializedIdentity{
Mspid: "SampleOrg",
IdBytes: []byte(certWithAttrs),
}
b, err := proto.Marshal(sid)
if err != nil {
return nil, err
Expand All @@ -161,7 +166,8 @@ func getIdemixMockStubWithAttrs() (cid.ChaincodeStubInterface, error) {
if err != nil {
return nil, err
}
sid := &msp.SerializedIdentity{Mspid: "idemixOrg",
sid := &msp.SerializedIdentity{
Mspid: "idemixOrg",
IdBytes: idBytes,
}
b, err := proto.Marshal(sid)
Expand Down
1 change: 0 additions & 1 deletion pkg/cid/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ type ChaincodeStubInterface interface {
// ClientIdentity represents information about the identity that submitted the
// transaction
type ClientIdentity interface {

// GetID returns the ID associated with the invoking identity. This ID
// is guaranteed to be unique within the MSP.
GetID() (string, error)
Expand Down
19 changes: 14 additions & 5 deletions shim/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -548,8 +548,12 @@ func (h *Handler) sendBatch(channelID string, txid string, writes []*peer.WriteR
return nil
}

func (h *Handler) handleGetStateByRange(collection, startKey, endKey string, metadata []byte,
channelID string, txid string) (*peer.QueryResponse, error) {
func (h *Handler) handleGetStateByRange(
collection, startKey, endKey string,
metadata []byte,
channelID string,
txid string,
) (*peer.QueryResponse, error) {
// Send GET_STATE_BY_RANGE message to peer chaincode support
payloadBytes := marshalOrPanic(&peer.GetStateByRange{Collection: collection, StartKey: startKey, EndKey: endKey, Metadata: metadata})
msg := &peer.ChaincodeMessage{Type: peer.ChaincodeMessage_GET_STATE_BY_RANGE, Payload: payloadBytes, Txid: txid, ChannelId: channelID}
Expand Down Expand Up @@ -651,8 +655,13 @@ func (h *Handler) handleQueryStateClose(id, channelID, txid string) (*peer.Query
return nil, fmt.Errorf("incorrect chaincode message %s received. Expecting %s or %s", responseMsg.Type, peer.ChaincodeMessage_RESPONSE, peer.ChaincodeMessage_ERROR)
}

func (h *Handler) handleGetQueryResult(collection string, query string, metadata []byte,
channelID string, txid string) (*peer.QueryResponse, error) {
func (h *Handler) handleGetQueryResult(
collection string,
query string,
metadata []byte,
channelID string,
txid string,
) (*peer.QueryResponse, error) {
// Send GET_QUERY_RESULT message to peer chaincode support
payloadBytes := marshalOrPanic(&peer.GetQueryResult{Collection: collection, Query: query, Metadata: metadata})
msg := &peer.ChaincodeMessage{Type: peer.ChaincodeMessage_GET_QUERY_RESULT, Payload: payloadBytes, Txid: txid, ChannelId: channelID}
Expand Down Expand Up @@ -853,7 +862,7 @@ func (h *Handler) handleMessage(msg *peer.ChaincodeMessage, errc chan error) err
if err != nil {
payload := []byte(err.Error())
errorMsg := &peer.ChaincodeMessage{Type: peer.ChaincodeMessage_ERROR, Payload: payload, Txid: msg.Txid}
h.serialSend(errorMsg) //nolint:errcheck
h.serialSend(errorMsg) //nolint:gosec
return err
}

Expand Down
5 changes: 2 additions & 3 deletions shim/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func TestNewHandler_CreatedState(t *testing.T) {
func TestHandlerState(t *testing.T) {
t.Parallel()

var tests = []struct {
tests := []struct {
name string
state state
msg *peer.ChaincodeMessage
Expand Down Expand Up @@ -135,7 +135,7 @@ func TestHandlerState(t *testing.T) {
func TestHandleMessage(t *testing.T) {
t.Parallel()

var tests = []struct {
tests := []struct {
name string
msg *peer.ChaincodeMessage
msgType peer.ChaincodeMessage_Type
Expand Down Expand Up @@ -294,5 +294,4 @@ func TestHandlePeerCalls(t *testing.T) {

_, err = h.handleGetHistoryForKey("key", "channel", "txid")
assert.ErrorContains(t, err, "cannot create response channel")

}
1 change: 0 additions & 1 deletion shim/internal/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ func NewClientConn(
tlsConf *tls.Config,
kaOpts keepalive.ClientParameters,
) (*grpc.ClientConn, error) {

dialOpts := []grpc.DialOption{
grpc.WithKeepaliveParams(kaOpts),
grpc.WithDefaultCallOptions(
Expand Down
7 changes: 4 additions & 3 deletions shim/internal/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func LoadConfig() (Config, error) {
var key []byte
path, set := os.LookupEnv("CORE_TLS_CLIENT_KEY_FILE")
if set {
key, err = os.ReadFile(path)
key, err = os.ReadFile(path) //nolint:gosec
if err != nil {
return Config{}, fmt.Errorf("failed to read private key file: %s", err)
}
Expand All @@ -66,7 +66,7 @@ func LoadConfig() (Config, error) {
var cert []byte
path, set = os.LookupEnv("CORE_TLS_CLIENT_CERT_FILE")
if set {
cert, err = os.ReadFile(path)
cert, err = os.ReadFile(path) //nolint:gosec
if err != nil {
return Config{}, fmt.Errorf("failed to read public key file: %s", err)
}
Expand Down Expand Up @@ -132,7 +132,8 @@ func LoadTLSConfig(isserver bool, key, cert, root []byte) (*tls.Config, error) {
if isserver {
tlscfg.ClientCAs = rootCertPool
tlscfg.SessionTicketsDisabled = true
tlscfg.CipherSuites = []uint16{tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
tlscfg.CipherSuites = []uint16{
tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
Expand Down
23 changes: 14 additions & 9 deletions shim/internal/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ IRoYMsQximSiU7XvGCYLslx4GauhRANCAARBGdslxalpg0dxk9GwVhi+Qw9oKZPE
n1hWPFmusDKtNbDLsHd9k1lU+SWnJKYlg7hmaUvxC1lR2M6KmvAwSUfN
-----END PRIVATE KEY-----
`

var certPEM = `-----BEGIN CERTIFICATE-----
MIICaTCCAhCgAwIBAgIQS46wcUDY2nJ2gQ/7fp/ptzAKBggqhkjOPQQDAjB2MQsw
CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy
Expand All @@ -45,6 +46,7 @@ Y2OHBH8AAAEwCgYIKoZIzj0EAwIDRwAwRAIgWgxAuGibD+Da/qCLBryJMDGlyIrx
HV+tI33lEy1B9qoCIEJD4xipI2WYp1sHmK2nxYPcoTb9WLFdNZ6twKZyw9c8
-----END CERTIFICATE-----
`

var rootPEM = `-----BEGIN CERTIFICATE-----
MIICSTCCAe+gAwIBAgIQWpamEC5/D2N5JKS8FEpgTzAKBggqhkjOPQQDAjB2MQsw
CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy
Expand Down Expand Up @@ -173,7 +175,7 @@ func TestLoadBase64EncodedConfig(t *testing.T) {
PermitWithoutStream: true,
}

var tests = []struct {
tests := []struct {
name string
env map[string]string
expected Config
Expand Down Expand Up @@ -300,7 +302,7 @@ func TestLoadBase64EncodedConfig(t *testing.T) {
test := test
t.Run(test.name, func(t *testing.T) {
for k, v := range test.env {
os.Setenv(k, v)
os.Setenv(k, v) //nolint:gosec
}
conf, err := LoadConfig()
if test.errMsg == "" {
Expand All @@ -320,7 +322,8 @@ func TestLoadBase64EncodedConfig(t *testing.T) {
Certificates: []tls.Certificate{clientCert},
ClientCAs: rootPool,
SessionTicketsDisabled: true,
CipherSuites: []uint16{tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
CipherSuites: []uint16{
tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
Expand All @@ -335,7 +338,8 @@ func TestLoadBase64EncodedConfig(t *testing.T) {
Certificates: []tls.Certificate{clientCert},
RootCAs: nil,
SessionTicketsDisabled: true,
CipherSuites: []uint16{tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
CipherSuites: []uint16{
tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
Expand All @@ -346,7 +350,7 @@ func TestLoadBase64EncodedConfig(t *testing.T) {
}

// additional tests to differentiate client vs server
var tlsTests = []struct {
tlsTests := []struct {
name string
issrv bool
key []byte
Expand Down Expand Up @@ -486,7 +490,7 @@ func TestLoadPEMEncodedConfig(t *testing.T) {
PermitWithoutStream: true,
}

var tests = []struct {
tests := []struct {
name string
env map[string]string
expected Config
Expand Down Expand Up @@ -565,7 +569,7 @@ func TestLoadPEMEncodedConfig(t *testing.T) {
test := test
t.Run(test.name, func(t *testing.T) {
for k, v := range test.env {
os.Setenv(k, v)
os.Setenv(k, v) //nolint:gosec
}
conf, err := LoadConfig()
if test.errMsg == "" {
Expand Down Expand Up @@ -631,7 +635,8 @@ func TestTLSClientWithChaincodeServer(t *testing.T) {
Certificates: []tls.Certificate{cert},
ClientCAs: rootPool,
SessionTicketsDisabled: true,
CipherSuites: []uint16{tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
CipherSuites: []uint16{
tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
Expand All @@ -642,7 +647,7 @@ func TestTLSClientWithChaincodeServer(t *testing.T) {
}

// given server is good and expects valid TLS connection, test good and invalid scenarios
var tlsTests = []struct {
tlsTests := []struct {
name string
issrv bool
clientKey []byte
Expand Down
1 change: 0 additions & 1 deletion shim/internal/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"time"

"github.com/hyperledger/fabric-chaincode-go/v2/shim/internal"

"github.com/stretchr/testify/assert"
"google.golang.org/grpc/keepalive"
)
Expand Down
Loading
Loading