Skip to content

Commit 796cf0d

Browse files
committed
copy config to avoid change by concurrent call
1 parent 23ba152 commit 796cf0d

File tree

4 files changed

+15
-9
lines changed

4 files changed

+15
-9
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ replace (
233233
// dgrijalva/jwt-go is deprecated and doesn't receive security updates.
234234
// TODO: remove it: https://github.com/cosmos/cosmos-sdk/issues/13134
235235
github.com/dgrijalva/jwt-go => github.com/golang-jwt/jwt/v4 v4.4.2
236-
github.com/ethereum/go-ethereum => github.com/mmsqe/go-ethereum v1.10.24-0.20231123010828-56c2cc86af1d
236+
github.com/ethereum/go-ethereum => github.com/mmsqe/go-ethereum v1.10.24-0.20231123130228-82f765d21a1b
237237
github.com/evmos/ethermint => github.com/crypto-org-chain/ethermint v0.6.1-0.20231123013901-b3fcb10994ac
238238
// Fix upstream GHSA-h395-qcrw-5vmq and GHSA-3vp4-m3rf-835h vulnerabilities.
239239
// TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,8 +1143,8 @@ github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR
11431143
github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A=
11441144
github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
11451145
github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
1146-
github.com/mmsqe/go-ethereum v1.10.24-0.20231123010828-56c2cc86af1d h1:6GILBx2knt7OC4z1NlYcKQeONn33d2AE676tBILmtOI=
1147-
github.com/mmsqe/go-ethereum v1.10.24-0.20231123010828-56c2cc86af1d/go.mod h1:DuefStAgaxoaYGLR0FueVcVbehmn5n9QUcVrMCuOvuc=
1146+
github.com/mmsqe/go-ethereum v1.10.24-0.20231123130228-82f765d21a1b h1:mmBNnw/xDW77Cn9ZK0jb/ySWscjIo8/cPJdrCwExEeI=
1147+
github.com/mmsqe/go-ethereum v1.10.24-0.20231123130228-82f765d21a1b/go.mod h1:DuefStAgaxoaYGLR0FueVcVbehmn5n9QUcVrMCuOvuc=
11481148
github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU=
11491149
github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc=
11501150
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw=

gomod2nix.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,8 @@ schema = 3
212212
version = "v1.1.0"
213213
hash = "sha256-LFcJue98awAFkSPRc93tVvon3kWS7AvumrluxxRzt4c="
214214
[mod."github.com/ethereum/go-ethereum"]
215-
version = "v1.10.24-0.20231123010828-56c2cc86af1d"
216-
hash = "sha256-c+LsJ/l1sKEBQVGejSAYlHSMsHWYCnE3Xce5jYioLvo="
215+
version = "v1.10.24-0.20231123130228-82f765d21a1b"
216+
hash = "sha256-0i/EwUkKe95I74QJgsmF5P2SPZ72fydHrUzdA0R1grs="
217217
replaced = "github.com/mmsqe/go-ethereum"
218218
[mod."github.com/evmos/ethermint"]
219219
version = "v0.6.1-0.20231123013901-b3fcb10994ac"

x/cronos/keeper/precompiles/relayer.go

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,16 @@ func (bc *RelayerContract) Address() common.Address {
6666
return relayerContractAddress
6767
}
6868

69-
func (bc *RelayerContract) SetChainConfig(isHomestead, isIstanbul, isShanghai bool) {
70-
bc.isHomestead = isHomestead
71-
bc.isIstanbul = isIstanbul
72-
bc.isShanghai = isShanghai
69+
func (bc *RelayerContract) WithChainConfig(isHomestead, isIstanbul, isShanghai bool) vm.PrecompiledContract {
70+
return &RelayerContract{
71+
BaseContract: bc.BaseContract,
72+
cdc: bc.cdc,
73+
ibcKeeper: bc.ibcKeeper,
74+
logger: bc.logger,
75+
isHomestead: isHomestead,
76+
isIstanbul: isIstanbul,
77+
isShanghai: isShanghai,
78+
}
7379
}
7480

7581
// RequiredGas calculates the contract gas use

0 commit comments

Comments
 (0)