Add post-Merge fixtures and refactor #6

Merged
roysc merged 13 commits from new-fixtures into main 2024-07-08 06:35:30 +00:00
6 changed files with 21 additions and 2 deletions
Showing only changes of commit 7c57c53dc8 - Show all commits

View File

@ -2,7 +2,6 @@ package chains
import (
"errors"
"fmt"
"io"
"os"
"path/filepath"
@ -33,7 +32,7 @@ func IsFixture(chain string) bool {
// GetFixture returns the paths to the fixture chaindata for the given name. This copies the
// fixture data and returns paths to temp directories, due to the fact that Go modules are installed
// read-only and Leveldb will attempt to create lock files when opening a DB.
// read-only and Leveldb/Pebble will attempt to create lock files when opening a DB.
func GetFixture(chain string) (*Paths, error) {
if !IsFixture(chain) {
return nil, errors.New("no fixture named " + chain)

View File

@ -0,0 +1 @@
MANIFEST-000005

Binary file not shown.

View File

@ -0,0 +1 @@
MANIFEST-000004

Binary file not shown.

View File

@ -0,0 +1,18 @@
// This fixture is the first using Pebble instead of Leveldb. It was generated by a fixturenet
// running geth 1.14.5 using a "merged from Genesis" configuration, as opposed to the previous
// fixtures for which the Merge occurred at block 1.
package postmerge1
import (
"github.com/cerc-io/eth-testing/chains"
)
var (
ChainData, err = chains.GetFixture("postmerge1")
)
func init() {
if err != nil {
panic(err)
}
}