tests: get test name from testing.T (#22941)
There were 2 TODOs about that fix after Golang 1.8 release. It's here for 3 years already, so now should be the right time.
This commit is contained in:
@@ -79,12 +79,12 @@ func TestDifficulty(t *testing.T) {
|
||||
dt.config("difficulty.json", mainnetChainConfig)
|
||||
|
||||
dt.walk(t, difficultyTestDir, func(t *testing.T, name string, test *DifficultyTest) {
|
||||
cfg := dt.findConfig(name)
|
||||
cfg := dt.findConfig(t)
|
||||
if test.ParentDifficulty.Cmp(params.MinimumDifficulty) < 0 {
|
||||
t.Skip("difficulty below minimum")
|
||||
return
|
||||
}
|
||||
if err := dt.checkFailure(t, name, test.Run(cfg)); err != nil {
|
||||
if err := dt.checkFailure(t, test.Run(cfg)); err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user