erigon-pulse/tests/exec_spec_test.go
Andrew Ashikhmin 0fdd60a0d1
Execution Spec Tests & HashCheck() (#6444)
Run tests from a new repo
https://github.com/ethereum/execution-spec-tests.

Also introduce `HashCheck()` function that checks correctness of block's
uncle, transaction, and withdrawals hashes.
2022-12-28 17:01:40 +01:00

28 lines
712 B
Go

package tests
import (
"path/filepath"
"testing"
"github.com/ledgerwatch/log/v3"
)
func TestExecutionSpec(t *testing.T) {
defer log.Root().SetHandler(log.Root().GetHandler())
log.Root().SetHandler(log.LvlFilterHandler(log.LvlError, log.StderrHandler))
bt := new(testMatcher)
dir := filepath.Join(".", "execution-spec-tests")
// Failing because the fixture was filled by geth w/o EIP-3860
bt.skipLoad(`^withdrawals/withdrawals/withdrawals_newly_created_contract.json`)
bt.walk(t, dir, func(t *testing.T, name string, test *BlockTest) {
// import pre accounts & construct test genesis block & state root
if err := bt.checkFailure(t, test.Run(t, false)); err != nil {
t.Error(err)
}
})
}