plugeth/trie
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
..
committer.go trie, les, tests, core: implement trie tracer (#24403) 2022-03-31 09:28:32 +02:00
database_test.go trie: there's no point in retrieving the metaroot 2019-04-05 13:09:28 +03:00
database.go rlp, trie: faster trie node encoding (#24126) 2022-03-09 14:45:17 +01:00
encoding_test.go trie: use stacktrie for Derivesha operation (#21407) 2020-09-29 17:38:13 +02:00
encoding.go trie: use stacktrie for Derivesha operation (#21407) 2020-09-29 17:38:13 +02:00
errors.go trie: more node iterator improvements (#14615) 2017-06-20 18:26:09 +02:00
hasher.go rlp, trie: faster trie node encoding (#24126) 2022-03-09 14:45:17 +01:00
iterator_test.go trie, les, tests, core: implement trie tracer (#24403) 2022-03-31 09:28:32 +02:00
iterator.go trie: fix two issues in trie iterator (#24539) 2022-03-15 10:23:37 +01:00
node_enc.go rlp, trie: faster trie node encoding (#24126) 2022-03-09 14:45:17 +01:00
node_test.go add node.go unit test file node_test.go (#20028) 2020-01-07 10:31:20 +01:00
node.go rlp, trie: faster trie node encoding (#24126) 2022-03-09 14:45:17 +01:00
proof_test.go trie, les, tests, core: implement trie tracer (#24403) 2022-03-31 09:28:32 +02:00
proof.go trie, les, tests, core: implement trie tracer (#24403) 2022-03-31 09:28:32 +02:00
secure_trie_test.go trie, les, tests, core: implement trie tracer (#24403) 2022-03-31 09:28:32 +02:00
secure_trie.go trie, les, tests, core: implement trie tracer (#24403) 2022-03-31 09:28:32 +02:00
stacktrie_test.go trie: more tests for stacktrie (#23936) 2021-11-22 08:49:18 +01:00
stacktrie.go rlp, trie: faster trie node encoding (#24126) 2022-03-09 14:45:17 +01:00
sync_test.go core, eth, les, trie: remove the sync bloom, used by fast sync 2021-12-03 12:32:41 +02:00
sync.go Merge pull request #24117 from holiman/db_has 2022-01-06 11:30:11 +02:00
trie_test.go all: use T.TempDir to create temporary test directories (#24633) 2022-04-08 15:44:55 +02:00
trie.go trie, les, tests, core: implement trie tracer (#24403) 2022-03-31 09:28:32 +02:00
util_test.go trie, les, tests, core: implement trie tracer (#24403) 2022-03-31 09:28:32 +02:00
utils.go trie, les, tests, core: implement trie tracer (#24403) 2022-03-31 09:28:32 +02:00