Skip to content

Commit 4dc70d4

Browse files
Merge pull request #104 from hyperledger/submission-reject
Require policy engines to map failures during submission to idempotency
2 parents 66e6593 + 8bcd0d4 commit 4dc70d4

28 files changed

+652
-124
lines changed

config.md

+12
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
|certFile|The path to the certificate file for TLS on this API|`string`|`<nil>`
3636
|clientAuth|Enables or disables client auth for TLS on this API|`string`|`<nil>`
3737
|enabled|Enables or disables TLS on this API|`boolean`|`false`
38+
|insecureSkipHostVerify|When to true in unit test development environments to disable TLS verification. Use with extreme caution|`boolean`|`<nil>`
3839
|keyFile|The path to the private key file for TLS on this API|`string`|`<nil>`
3940
|requiredDNAttributes|A set of required subject DN attributes. Each entry is a regular expression, and the subject certificate must have a matching attribute of the specified type (CN, C, O, OU, ST, L, STREET, POSTALCODE, SERIALNUMBER are valid attributes)|`map[string]string`|`<nil>`
4041

@@ -100,6 +101,7 @@
100101
|certFile|The path to the certificate file for TLS on this API|`string`|`<nil>`
101102
|clientAuth|Enables or disables client auth for TLS on this API|`string`|`<nil>`
102103
|enabled|Enables or disables TLS on this API|`boolean`|`false`
104+
|insecureSkipHostVerify|When to true in unit test development environments to disable TLS verification. Use with extreme caution|`boolean`|`<nil>`
103105
|keyFile|The path to the private key file for TLS on this API|`string`|`<nil>`
104106
|requiredDNAttributes|A set of required subject DN attributes. Each entry is a regular expression, and the subject certificate must have a matching attribute of the specified type (CN, C, O, OU, ST, L, STREET, POSTALCODE, SERIALNUMBER are valid attributes)|`map[string]string`|`<nil>`
105107

@@ -194,6 +196,7 @@
194196
|certFile|The path to the certificate file for TLS on this API|`string`|`<nil>`
195197
|clientAuth|Enables or disables client auth for TLS on this API|`string`|`<nil>`
196198
|enabled|Enables or disables TLS on this API|`boolean`|`false`
199+
|insecureSkipHostVerify|When to true in unit test development environments to disable TLS verification. Use with extreme caution|`boolean`|`<nil>`
197200
|keyFile|The path to the private key file for TLS on this API|`string`|`<nil>`
198201
|requiredDNAttributes|A set of required subject DN attributes. Each entry is a regular expression, and the subject certificate must have a matching attribute of the specified type (CN, C, O, OU, ST, L, STREET, POSTALCODE, SERIALNUMBER are valid attributes)|`map[string]string`|`<nil>`
199202

@@ -260,6 +263,7 @@
260263
|expectContinueTimeout|See [ExpectContinueTimeout in the Go docs](https://pkg.go.dev/net/http#Transport)|[`time.Duration`](https://pkg.go.dev/time#Duration)|`<nil>`
261264
|headers|Adds custom headers to HTTP requests|`map[string]string`|`<nil>`
262265
|idleTimeout|The max duration to hold a HTTP keepalive connection between calls|[`time.Duration`](https://pkg.go.dev/time#Duration)|`<nil>`
266+
|maxConnsPerHost|The max number of connections, per unique hostname. Zero means no limit|`int`|`<nil>`
263267
|maxIdleConns|The max number of idle connections to hold pooled|`int`|`<nil>`
264268
|method|Deprecated: Please use 'transactions.handler.simple.gasOracle.method' instead|`string`|`<nil>`
265269
|mode|Deprecated: Please use 'transactions.handler.simple.gasOracle.mode' instead|'connector', 'restapi', 'fixed', or 'disabled'|`<nil>`
@@ -289,6 +293,7 @@
289293
|---|-----------|----|-------------|
290294
|count|The maximum number of times to retry|`int`|`<nil>`
291295
|enabled|Enables retries|`boolean`|`<nil>`
296+
|errorStatusCodeRegex|The regex that the error response status code must match to trigger retry|`string`|`<nil>`
292297
|initWaitTime|The initial retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`<nil>`
293298
|maxWaitTime|The maximum retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`<nil>`
294299

@@ -300,6 +305,7 @@
300305
|certFile|The path to the certificate file for TLS on this API|`string`|`<nil>`
301306
|clientAuth|Enables or disables client auth for TLS on this API|`string`|`<nil>`
302307
|enabled|Enables or disables TLS on this API|`boolean`|`<nil>`
308+
|insecureSkipHostVerify|When to true in unit test development environments to disable TLS verification. Use with extreme caution|`boolean`|`<nil>`
303309
|keyFile|The path to the private key file for TLS on this API|`string`|`<nil>`
304310
|requiredDNAttributes|A set of required subject DN attributes. Each entry is a regular expression, and the subject certificate must have a matching attribute of the specified type (CN, C, O, OU, ST, L, STREET, POSTALCODE, SERIALNUMBER are valid attributes)|`map[string]string`|`<nil>`
305311

@@ -348,6 +354,7 @@
348354
|expectContinueTimeout|See [ExpectContinueTimeout in the Go docs](https://pkg.go.dev/net/http#Transport)|[`time.Duration`](https://pkg.go.dev/time#Duration)|`<nil>`
349355
|headers|Adds custom headers to HTTP requests|`map[string]string`|`<nil>`
350356
|idleTimeout|The max duration to hold a HTTP keepalive connection between calls|[`time.Duration`](https://pkg.go.dev/time#Duration)|`<nil>`
357+
|maxConnsPerHost|The max number of connections, per unique hostname. Zero means no limit|`int`|`<nil>`
351358
|maxIdleConns|The max number of idle connections to hold pooled|`int`|`<nil>`
352359
|method|The HTTP Method to use when invoking the Gas Oracle REST API|`string`|`<nil>`
353360
|mode|The gas oracle mode|'connector', 'restapi', 'fixed', or 'disabled'|`<nil>`
@@ -377,6 +384,7 @@
377384
|---|-----------|----|-------------|
378385
|count|The maximum number of times to retry|`int`|`<nil>`
379386
|enabled|Enables retries|`boolean`|`<nil>`
387+
|errorStatusCodeRegex|The regex that the error response status code must match to trigger retry|`string`|`<nil>`
380388
|initWaitTime|The initial retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`<nil>`
381389
|maxWaitTime|The maximum retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`<nil>`
382390

@@ -388,6 +396,7 @@
388396
|certFile|The path to the certificate file for TLS on this API|`string`|`<nil>`
389397
|clientAuth|Enables or disables client auth for TLS on this API|`string`|`<nil>`
390398
|enabled|Enables or disables TLS on this API|`boolean`|`<nil>`
399+
|insecureSkipHostVerify|When to true in unit test development environments to disable TLS verification. Use with extreme caution|`boolean`|`<nil>`
391400
|keyFile|The path to the private key file for TLS on this API|`string`|`<nil>`
392401
|requiredDNAttributes|A set of required subject DN attributes. Each entry is a regular expression, and the subject certificate must have a matching attribute of the specified type (CN, C, O, OU, ST, L, STREET, POSTALCODE, SERIALNUMBER are valid attributes)|`map[string]string`|`<nil>`
393402

@@ -408,6 +417,7 @@
408417
|expectContinueTimeout|See [ExpectContinueTimeout in the Go docs](https://pkg.go.dev/net/http#Transport)|[`time.Duration`](https://pkg.go.dev/time#Duration)|`1s`
409418
|headers|Adds custom headers to HTTP requests|`map[string]string`|`<nil>`
410419
|idleTimeout|The max duration to hold a HTTP keepalive connection between calls|[`time.Duration`](https://pkg.go.dev/time#Duration)|`475ms`
420+
|maxConnsPerHost|The max number of connections, per unique hostname. Zero means no limit|`int`|`0`
411421
|maxIdleConns|The max number of idle connections to hold pooled|`int`|`100`
412422
|passthroughHeadersEnabled|Enable passing through the set of allowed HTTP request headers|`boolean`|`false`
413423
|requestTimeout|The maximum amount of time that a request is allowed to remain open|[`time.Duration`](https://pkg.go.dev/time#Duration)|`30s`
@@ -432,6 +442,7 @@
432442
|---|-----------|----|-------------|
433443
|count|The maximum number of times to retry|`int`|`5`
434444
|enabled|Enables retries|`boolean`|`false`
445+
|errorStatusCodeRegex|The regex that the error response status code must match to trigger retry|`string`|`<nil>`
435446
|initWaitTime|The initial retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`250ms`
436447
|maxWaitTime|The maximum retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`30s`
437448

@@ -443,5 +454,6 @@
443454
|certFile|The path to the certificate file for TLS on this API|`string`|`<nil>`
444455
|clientAuth|Enables or disables client auth for TLS on this API|`string`|`<nil>`
445456
|enabled|Enables or disables TLS on this API|`boolean`|`false`
457+
|insecureSkipHostVerify|When to true in unit test development environments to disable TLS verification. Use with extreme caution|`boolean`|`<nil>`
446458
|keyFile|The path to the private key file for TLS on this API|`string`|`<nil>`
447459
|requiredDNAttributes|A set of required subject DN attributes. Each entry is a regular expression, and the subject certificate must have a matching attribute of the specified type (CN, C, O, OU, ST, L, STREET, POSTALCODE, SERIALNUMBER are valid attributes)|`map[string]string`|`<nil>`

go.mod

+8-8
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,30 @@ require (
77
github.com/Masterminds/sprig/v3 v3.2.2
88
github.com/Masterminds/squirrel v1.5.4
99
github.com/getkin/kin-openapi v0.116.0
10-
github.com/ghodss/yaml v1.0.0
1110
github.com/go-resty/resty/v2 v2.7.0
1211
github.com/golang-migrate/migrate/v4 v4.16.1
1312
github.com/gorilla/mux v1.8.0
1413
github.com/gorilla/websocket v1.5.0
1514
github.com/hashicorp/golang-lru/v2 v2.0.3
16-
github.com/hyperledger/firefly-common v1.2.18
15+
github.com/hyperledger/firefly-common v1.4.1
1716
github.com/lib/pq v1.10.9
1817
github.com/oklog/ulid/v2 v2.1.0
1918
github.com/prometheus/client_golang v1.13.0
2019
github.com/sirupsen/logrus v1.9.2
2120
github.com/spf13/viper v1.14.0
2221
github.com/stretchr/testify v1.8.1
2322
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7
24-
golang.org/x/text v0.9.0
23+
golang.org/x/text v0.14.0
2524
)
2625

2726
require (
27+
github.com/ghodss/yaml v1.0.0 // indirect
2828
github.com/hashicorp/errwrap v1.1.0 // indirect
2929
github.com/hashicorp/go-multierror v1.1.1 // indirect
3030
github.com/inconshreveable/mousetrap v1.0.1 // indirect
3131
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
3232
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
33+
github.com/mattn/go-sqlite3 v1.14.16 // indirect
3334
github.com/perimeterx/marshmallow v1.1.4 // indirect
3435
gitlab.com/hfuss/mux-prometheus v0.0.5 // indirect
3536
go.uber.org/atomic v1.10.0 // indirect
@@ -83,14 +84,13 @@ require (
8384
github.com/stretchr/objx v0.5.0 // indirect
8485
github.com/subosito/gotenv v1.4.1 // indirect
8586
github.com/x-cray/logrus-prefixed-formatter v0.5.2 // indirect
86-
golang.org/x/crypto v0.7.0 // indirect
87-
golang.org/x/net v0.10.0 // indirect
88-
golang.org/x/sys v0.8.0 // indirect
89-
golang.org/x/term v0.8.0 // indirect
87+
golang.org/x/crypto v0.17.0 // indirect
88+
golang.org/x/net v0.19.0 // indirect
89+
golang.org/x/sys v0.15.0 // indirect
90+
golang.org/x/term v0.15.0 // indirect
9091
google.golang.org/protobuf v1.28.1 // indirect
9192
gopkg.in/ini.v1 v1.67.0 // indirect
9293
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
9394
gopkg.in/yaml.v2 v2.4.0 // indirect
9495
gopkg.in/yaml.v3 v3.0.1 // indirect
95-
gotest.tools/v3 v3.1.0 // indirect
9696
)

go.sum

+13-14
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,8 @@ github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T
206206
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
207207
github.com/huandu/xstrings v1.3.1 h1:4jgBlKK6tLKFvO8u5pmYjG91cqytmDCDvGh7ECVFfFs=
208208
github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
209-
github.com/hyperledger/firefly-common v1.2.18 h1:oMxmhVsVhitoEeZXJPVIM10RxwK0Z33GeR+VPXxULms=
210-
github.com/hyperledger/firefly-common v1.2.18/go.mod h1:17lOH4YufiPy82LpKm8fPa/YXJ0pUyq01zK1CmklJwM=
209+
github.com/hyperledger/firefly-common v1.4.1 h1:ZhEsEQonzOHIUnHeEm+z8hq5BIQIVy1c41kVTjhblRM=
210+
github.com/hyperledger/firefly-common v1.4.1/go.mod h1:wbhklt6aNEs3cEQjNEf3NZXOnB5pz0f2gxRh6S9rBmg=
211211
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
212212
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
213213
github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
@@ -257,6 +257,7 @@ github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovk
257257
github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ=
258258
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
259259
github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y=
260+
github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
260261
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
261262
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI=
262263
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
@@ -355,7 +356,6 @@ github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA=
355356
github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY=
356357
github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=
357358
github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
358-
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
359359
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
360360
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
361361
github.com/spf13/viper v1.14.0 h1:Rg7d3Lo706X9tHsJMUjdiwMpHB7W8WnSVOssIY+JElU=
@@ -407,8 +407,8 @@ golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPh
407407
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
408408
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
409409
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
410-
golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A=
411-
golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=
410+
golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k=
411+
golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
412412
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
413413
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
414414
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -483,8 +483,8 @@ golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qx
483483
golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
484484
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
485485
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
486-
golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M=
487-
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
486+
golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c=
487+
golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U=
488488
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
489489
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
490490
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -560,12 +560,12 @@ golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBc
560560
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
561561
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
562562
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
563-
golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU=
564-
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
563+
golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
564+
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
565565
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
566566
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
567-
golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols=
568-
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
567+
golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4=
568+
golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0=
569569
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
570570
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
571571
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -574,8 +574,8 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
574574
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
575575
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
576576
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
577-
golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE=
578-
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
577+
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
578+
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
579579
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
580580
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
581581
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@@ -749,7 +749,6 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
749749
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
750750
gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo=
751751
gotest.tools/v3 v3.1.0 h1:rVV8Tcg/8jHUkPUorwjaMTtemIMVXfIPKiOqnhEhakk=
752-
gotest.tools/v3 v3.1.0/go.mod h1:fHy7eyTmJFO5bQbUsEGQ1v4m2J3Jz9eWL54TP2/ZuYQ=
753752
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
754753
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
755754
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=

internal/persistence/dbmigration/leveldb2postgres_test.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import (
2020
"context"
2121
"database/sql"
2222
"fmt"
23-
"io/ioutil"
2423
"os"
2524
"path"
2625
"testing"
@@ -95,7 +94,7 @@ func TestMigrateLevelDBToPostgres(t *testing.T) {
9594
defer done()
9695

9796
// Configure a test LevelDB
98-
dir, err := ioutil.TempDir("", "ldb_*")
97+
dir, err := os.MkdirTemp("", "ldb_*")
9998
assert.NoError(t, err)
10099
config.Set(tmconfig.PersistenceLevelDBPath, dir)
101100

@@ -109,7 +108,7 @@ func TestMigrateLevelDBToPostgresFailPSQL(t *testing.T) {
109108
tmconfig.Reset()
110109

111110
// Configure a test LevelDB
112-
dir, err := ioutil.TempDir("", "ldb_*")
111+
dir, err := os.MkdirTemp("", "ldb_*")
113112
assert.NoError(t, err)
114113
config.Set(tmconfig.PersistenceLevelDBPath, dir)
115114

internal/persistence/leveldb/leveldb_persistence_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func newTestLevelDBPersistence(t *testing.T) (context.Context, *leveldbPersisten
3939

4040
ctx, cancelCtx := context.WithCancel(context.Background())
4141

42-
dir, err := ioutil.TempDir("", "ldb_*")
42+
dir, err := os.MkdirTemp("", "ldb_*")
4343
assert.NoError(t, err)
4444

4545
tmconfig.Reset()

0 commit comments

Comments
 (0)