mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-17 18:30:45 +00:00
core/vm: more linters (#24783)
This commit is contained in:
parent
be6631beb0
commit
16f2aabc64
2 changed files with 24 additions and 26 deletions
|
|
@ -29,8 +29,6 @@ import (
|
||||||
"github.com/XinFinOrg/XDPoSChain/crypto/blake2b"
|
"github.com/XinFinOrg/XDPoSChain/crypto/blake2b"
|
||||||
"github.com/XinFinOrg/XDPoSChain/crypto/bn256"
|
"github.com/XinFinOrg/XDPoSChain/crypto/bn256"
|
||||||
"github.com/XinFinOrg/XDPoSChain/params"
|
"github.com/XinFinOrg/XDPoSChain/params"
|
||||||
|
|
||||||
//lint:ignore SA1019 Needed for precompile
|
|
||||||
"golang.org/x/crypto/ripemd160"
|
"golang.org/x/crypto/ripemd160"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -230,8 +230,13 @@ func TestAddMod(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// utility function to fill the json-file with testcases
|
||||||
|
// Enable this test to generate the 'testcases_xx.json' files
|
||||||
|
func TestWriteExpectedValues(t *testing.T) {
|
||||||
|
t.Skip("Enable this test to create json test cases.")
|
||||||
|
|
||||||
// getResult is a convenience function to generate the expected values
|
// getResult is a convenience function to generate the expected values
|
||||||
func getResult(args []*twoOperandParams, opFn executionFunc) []TwoOperandTestcase {
|
getResult := func(args []*twoOperandParams, opFn executionFunc) []TwoOperandTestcase {
|
||||||
var (
|
var (
|
||||||
env = NewEVM(BlockContext{}, TxContext{}, nil, nil, params.TestChainConfig, Config{})
|
env = NewEVM(BlockContext{}, TxContext{}, nil, nil, params.TestChainConfig, Config{})
|
||||||
stack = newstack()
|
stack = newstack()
|
||||||
|
|
@ -254,11 +259,6 @@ func getResult(args []*twoOperandParams, opFn executionFunc) []TwoOperandTestcas
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
// utility function to fill the json-file with testcases
|
|
||||||
// Enable this test to generate the 'testcases_xx.json' files
|
|
||||||
func TestWriteExpectedValues(t *testing.T) {
|
|
||||||
t.Skip("Enable this test to create json test cases.")
|
|
||||||
|
|
||||||
for name, method := range twoOpMethods {
|
for name, method := range twoOpMethods {
|
||||||
data, err := json.Marshal(getResult(commonParams, method))
|
data, err := json.Marshal(getResult(commonParams, method))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue