diff --git a/x/token/services/network/evm/endorsement/fakes_test.go b/x/token/services/network/evm/endorsement/fakes_test.go index f3dda25e0c..7e94cc8c04 100644 --- a/x/token/services/network/evm/endorsement/fakes_test.go +++ b/x/token/services/network/evm/endorsement/fakes_test.go @@ -69,7 +69,9 @@ func (s *pipeSession) Close() {} // own session via Session. Everything the endorsement views do not touch panics, so an unexpected // dependency surfaces loudly rather than silently. type fakeContext struct { - ctx context.Context + // view.Context is an interface whose Context() method returns one, so an implementation of it has + // to hold a context. + ctx context.Context //nolint:containedctx me view.Identity sessions map[string]view.Session // keyed by party UniqueID, for GetSession (initiator side) own view.Session // for Session() (responder side) diff --git a/x/token/services/network/evm/endorsement/ledger.go b/x/token/services/network/evm/endorsement/ledger.go index f358722d21..c2d9c107bf 100644 --- a/x/token/services/network/evm/endorsement/ledger.go +++ b/x/token/services/network/evm/endorsement/ledger.go @@ -34,7 +34,9 @@ const getTokenMethod = "getToken(bytes32)" // #nosec G101 -- ABI method signatur // Ledger satisfies token.Ledger, so it can be passed straight to // Validator.UnmarshallAndVerifyWithMetadata. type Ledger struct { - ctx context.Context + // GetState takes no context (driver.GetStateFnc has none), so the one to read the chain with is + // captured here. A Ledger is built per request and used only for it, so it stays short-lived. + ctx context.Context //nolint:containedctx client client.EVMClient tokenState client.Address blockTag string diff --git a/x/token/services/network/evm/go.mod b/x/token/services/network/evm/go.mod index 3ad025b39a..4c3b0c46d1 100644 --- a/x/token/services/network/evm/go.mod +++ b/x/token/services/network/evm/go.mod @@ -8,7 +8,7 @@ require ( github.com/IBM/mathlib v0.3.0 github.com/LFDT-Panurus/panurus v0.0.0-00010101000000-000000000000 github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.1 - github.com/hyperledger-labs/fabric-smart-client v0.16.0 + github.com/hyperledger-labs/fabric-smart-client v0.17.0 github.com/stretchr/testify v1.11.1 go.opentelemetry.io/otel/trace v1.44.0 golang.org/x/crypto v0.54.0 diff --git a/x/token/services/network/evm/go.sum b/x/token/services/network/evm/go.sum index 9b2951c17f..37742fef6c 100644 --- a/x/token/services/network/evm/go.sum +++ b/x/token/services/network/evm/go.sum @@ -86,8 +86,8 @@ github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/C github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= -github.com/hyperledger-labs/fabric-smart-client v0.16.0 h1:JZtM2pd174Wo3rOJJIEN7dgvjpsp+K2J2lqCifVulJc= -github.com/hyperledger-labs/fabric-smart-client v0.16.0/go.mod h1:Xfm18BI6WuGU3IG++j8AyiThC74ZBDjd+VI5zoH9edw= +github.com/hyperledger-labs/fabric-smart-client v0.17.0 h1:6BKrkd0PFuDM0GMjL5brVl+wF3pnxj+G390XNCbWjRo= +github.com/hyperledger-labs/fabric-smart-client v0.17.0/go.mod h1:Xfm18BI6WuGU3IG++j8AyiThC74ZBDjd+VI5zoH9edw= github.com/hyperledger/fabric-amcl v0.0.0-20230602173724-9e02669dceb2 h1:B1Nt8hKb//KvgGRprk0h1t4lCnwhE9/ryb1WqfZbV+M= github.com/hyperledger/fabric-amcl v0.0.0-20230602173724-9e02669dceb2/go.mod h1:X+DIyUsaTmalOpmpQfIvFZjKHQedrURQ5t4YqquX7lE= github.com/hyperledger/fabric-lib-go v1.1.5-0.20260708100132-163bcc919208 h1:qA49XOMwyNPxggVyW+HSDAg7I3GdtlGWDTbh40/rwZk=