mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-22 03:30:37 +00:00
chore: remove refs to deprecated io/ioutil (#8557)
This commit is contained in:
parent
97e94f6d2c
commit
887dd255ff
@ -6,14 +6,14 @@ import (
|
||||
"github.com/ledgerwatch/erigon/cl/phase1/core/state"
|
||||
"github.com/ledgerwatch/erigon/cl/utils"
|
||||
"io/fs"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
)
|
||||
|
||||
func (r *RegressionTester) readStartingState() (*state.CachingBeaconState, error) {
|
||||
stateFile, err := ioutil.ReadFile(path.Join(r.testDirectory, regressionPath, startingStatePath))
|
||||
stateFile, err := os.ReadFile(path.Join(r.testDirectory, regressionPath, startingStatePath))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -33,7 +33,7 @@ func (r *RegressionTester) initBlocks() error {
|
||||
if info == nil || info.IsDir() || info.Name() != "data.bin" {
|
||||
return nil
|
||||
}
|
||||
f, err := ioutil.ReadFile(path)
|
||||
f, err := os.ReadFile(path)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -5,7 +5,6 @@ import (
|
||||
"encoding/binary"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@ -24,7 +23,7 @@ var ErrInvalidEnodeString = errors.New("invalid enode string")
|
||||
func ClearDevDB(dataDir string, logger log.Logger) error {
|
||||
logger.Info("Deleting nodes' data folders")
|
||||
|
||||
files, err := ioutil.ReadDir(dataDir)
|
||||
files, err := os.ReadDir(dataDir)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user