core/vm: update benchmark to use Errorf instead of Sprintf (#24845)

This commit is contained in:
Daniel Liu 2024-09-24 16:01:34 +08:00 committed by Daniel Liu
parent 6fa968201f
commit 45c644c43d

View file

@ -618,7 +618,7 @@ func benchmarkPrecompiled(addr string, test precompiledTest, bench *testing.B) {
return return
} }
if common.Bytes2Hex(res) != test.expected { if common.Bytes2Hex(res) != test.expected {
bench.Error(fmt.Sprintf("Expected %v, got %v", test.expected, common.Bytes2Hex(res))) bench.Errorf("Expected %v, got %v", test.expected, common.Bytes2Hex(res))
return return
} }
}) })