plugeth/eth
Eng Zer Jun 8d066f1f42
all: use T.TempDir to create temporary test directories (#24633)
This commit replaces ioutil.TempDir with t.TempDir in tests. The
directory created by t.TempDir is automatically removed when the test
and all its subtests complete.

Prior to this commit, temporary directory created using ioutil.TempDir
had to be removed manually by calling os.RemoveAll, which is omitted in
some tests. The error handling boilerplate e.g.

	defer func() {
		if err := os.RemoveAll(dir); err != nil {
			t.Fatal(err)
		}
	}

is also tedious, but t.TempDir handles this for us nicely.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-04-08 15:44:55 +02:00
..
catalyst eth/catalyst: only apply block if we actually have the state (#24598) 2022-03-29 18:26:18 +02:00
downloader all: use T.TempDir to create temporary test directories (#24633) 2022-04-08 15:44:55 +02:00
ethconfig cmd/geth: rename --whitelist to --eth.requiredblocks (#24505) 2022-03-15 12:20:03 +01:00
fetcher eth/fetcher: if peers never respond, drop them 2022-04-06 10:18:57 +03:00
filters all: use T.TempDir to create temporary test directories (#24633) 2022-04-08 15:44:55 +02:00
gasprice graphql: fee history fields (#24452) 2022-03-10 13:59:22 +01:00
protocols Merge pull request #24529 from holiman/fix_inf 2022-03-11 10:40:55 +02:00
tracers eth/tracers: refactor traceTx to separate out struct logging (#24326) 2022-04-06 09:34:18 +02:00
api_backend.go eth: clarify the error string on getlogs failure (#24617) 2022-03-31 21:16:03 +02:00
api_test.go cmd/geth, eth, core: snapshot dump + unify with trie dump (#22795) 2021-05-12 11:05:39 +03:00
api.go eth: fix typo in comment (#23941) 2021-11-22 02:53:16 +01:00
backend.go cmd/geth: rename --whitelist to --eth.requiredblocks (#24505) 2022-03-15 12:20:03 +01:00
bloombits.go eth: move eth.Config to a common package (#22205) 2021-02-05 13:51:15 +01:00
discovery.go cmd/utils: use eth DNS tree for snap discovery (#22808) 2021-05-04 11:29:32 +02:00
handler_eth_test.go core/types: faster RLP encoding of Header, StateAcccount, ReceiptForStorage (#24420) 2022-02-18 08:10:26 +01:00
handler_eth.go core, eth, les, trie: remove the sync bloom, used by fast sync 2021-12-03 12:32:41 +02:00
handler_snap.go eth: check snap satelliteness, delegate drop to eth (#22235) 2021-02-02 10:44:36 +02:00
handler_test.go eth: request id dispatcher and direct req/reply APIs (#23576) 2021-11-26 13:26:03 +02:00
handler.go eth: change snapshot extension registration failure to warning instead of error (#24475) 2022-03-30 10:28:27 +02:00
peer.go eth: request id dispatcher and direct req/reply APIs (#23576) 2021-11-26 13:26:03 +02:00
peerset.go eth/downloader: implement beacon sync (#23982) 2022-03-11 14:14:45 +02:00
state_accessor.go all: core rework for the merge transition (#23761) 2021-11-26 13:23:02 +02:00
sync_test.go eth: request id dispatcher and direct req/reply APIs (#23576) 2021-11-26 13:26:03 +02:00
sync.go core: eth: implement Kiln-v2 spec (#24506) 2022-03-17 17:20:03 +02:00