mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-05 04:31:16 +00:00
parent
f272ce1123
commit
34a245fbc8
5 changed files with 6 additions and 5 deletions
|
|
@ -49,6 +49,7 @@ import (
|
||||||
"runtime"
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/XinFinOrg/XDPoSChain/common"
|
||||||
"github.com/XinFinOrg/XDPoSChain/internal/build"
|
"github.com/XinFinOrg/XDPoSChain/internal/build"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -79,7 +80,7 @@ func executablePath(name string) string {
|
||||||
func main() {
|
func main() {
|
||||||
log.SetFlags(log.Lshortfile)
|
log.SetFlags(log.Lshortfile)
|
||||||
|
|
||||||
if _, err := os.Stat(filepath.Join("build", "ci.go")); os.IsNotExist(err) {
|
if !common.FileExist(filepath.Join("build", "ci.go")) {
|
||||||
log.Fatal("this script must be run from the root of the repository")
|
log.Fatal("this script must be run from the root of the repository")
|
||||||
}
|
}
|
||||||
if len(os.Args) < 2 {
|
if len(os.Args) < 2 {
|
||||||
|
|
|
||||||
|
|
@ -1584,7 +1584,7 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
|
||||||
}
|
}
|
||||||
if ctx.IsSet(StoreRewardFlag.Name) {
|
if ctx.IsSet(StoreRewardFlag.Name) {
|
||||||
common.StoreRewardFolder = filepath.Join(stack.DataDir(), "XDC", "rewards")
|
common.StoreRewardFolder = filepath.Join(stack.DataDir(), "XDC", "rewards")
|
||||||
if _, err := os.Stat(common.StoreRewardFolder); os.IsNotExist(err) {
|
if !common.FileExist(common.StoreRewardFolder) {
|
||||||
os.Mkdir(common.StoreRewardFolder, os.ModePerm)
|
os.Mkdir(common.StoreRewardFolder, os.ModePerm)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ func newTxJournal(path string) *journal {
|
||||||
// the specified pool.
|
// the specified pool.
|
||||||
func (journal *journal) load(add func([]*types.Transaction) []error) error {
|
func (journal *journal) load(add func([]*types.Transaction) []error) error {
|
||||||
// Skip the parsing if the journal file doens't exist at all
|
// Skip the parsing if the journal file doens't exist at all
|
||||||
if _, err := os.Stat(journal.path); os.IsNotExist(err) {
|
if !common.FileExist(journal.path) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
// Open the journal for loading any past transactions
|
// Open the journal for loading any past transactions
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ func newLendingTxJournal(path string) *lendingtxJournal {
|
||||||
// the specified pool.
|
// the specified pool.
|
||||||
func (journal *lendingtxJournal) load(add func(*types.LendingTransaction) error) error {
|
func (journal *lendingtxJournal) load(add func(*types.LendingTransaction) error) error {
|
||||||
// Skip the parsing if the journal file doens't exist at all
|
// Skip the parsing if the journal file doens't exist at all
|
||||||
if _, err := os.Stat(journal.path); os.IsNotExist(err) {
|
if !common.FileExist(journal.path) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
// Open the journal for loading any past transactions
|
// Open the journal for loading any past transactions
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ func newOrderTxJournal(path string) *ordertxJournal {
|
||||||
// the specified pool.
|
// the specified pool.
|
||||||
func (journal *ordertxJournal) load(add func(*types.OrderTransaction) error) error {
|
func (journal *ordertxJournal) load(add func(*types.OrderTransaction) error) error {
|
||||||
// Skip the parsing if the journal file doens't exist at all
|
// Skip the parsing if the journal file doens't exist at all
|
||||||
if _, err := os.Stat(journal.path); os.IsNotExist(err) {
|
if !common.FileExist(journal.path) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
// Open the journal for loading any past transactions
|
// Open the journal for loading any past transactions
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue