mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
Fixed issue | File updated
This commit is contained in:
parent
a4e35b0a22
commit
1ce4eba0d6
3 changed files with 8 additions and 32 deletions
|
|
@ -74,8 +74,10 @@ SUBCOMMANDS:
|
|||
|
||||
func init() {
|
||||
cli.AppHelpTemplate = `{{.Name}} {{if .Flags}}[global options] {{end}}command{{if .Flags}} [command options]{{end}} [arguments...]
|
||||
|
||||
VERSION:
|
||||
{{.Version}}
|
||||
|
||||
COMMANDS:
|
||||
{{range .Commands}}{{.Name}}{{with .ShortName}}, {{.}}{{end}}{{ "\t" }}{{.Usage}}
|
||||
{{end}}{{if .Flags}}
|
||||
|
|
@ -110,12 +112,6 @@ func NewApp(gitCommit, usage string) *cli.App {
|
|||
// are the same for all commands.
|
||||
|
||||
var (
|
||||
// XDC flags.
|
||||
RollbackFlag = cli.StringFlag{
|
||||
Name: "rollback",
|
||||
Usage: "Rollback chain at hash",
|
||||
Value: "",
|
||||
}
|
||||
// General settings
|
||||
AnnounceTxsFlag = cli.BoolFlag{
|
||||
Name: "announce-txs",
|
||||
|
|
@ -1091,9 +1087,9 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) {
|
|||
cfg.EnablePreimageRecording = ctx.GlobalBool(VMEnableDebugFlag.Name)
|
||||
}
|
||||
if ctx.GlobalIsSet(StoreRewardFlag.Name) {
|
||||
common.StoreRewardFolder = filepath.Join(stack.DataDir(), "XDC", "rewards")
|
||||
if _, err := os.Stat(common.StoreRewardFolder); os.IsNotExist(err) {
|
||||
os.Mkdir(common.StoreRewardFolder, os.ModePerm)
|
||||
cfg.StoreRewardFolder = filepath.Join(stack.DataDir(), "XDC", "rewards")
|
||||
if _, err := os.Stat(cfg.StoreRewardFolder); os.IsNotExist(err) {
|
||||
os.Mkdir(cfg.StoreRewardFolder, os.ModePerm)
|
||||
}
|
||||
}
|
||||
// Override any default configs for hard coded networks.
|
||||
|
|
@ -1260,7 +1256,6 @@ func MakeChain(ctx *cli.Context, stack *node.Node) (chain *core.BlockChain, chai
|
|||
DatasetsOnDisk: eth.DefaultConfig.Ethash.DatasetsOnDisk,
|
||||
})
|
||||
}
|
||||
Fatalf("Only support XDPoS consensus")
|
||||
}
|
||||
if gcmode := ctx.GlobalString(GCModeFlag.Name); gcmode != "full" && gcmode != "archive" {
|
||||
Fatalf("--%s must be either 'full' or 'archive'", GCModeFlag.Name)
|
||||
|
|
@ -1320,4 +1315,4 @@ func MigrateFlags(action func(ctx *cli.Context) error) func(*cli.Context) error
|
|||
}
|
||||
return action(ctx)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
package common
|
||||
|
||||
import "math/big"
|
||||
|
||||
const (
|
||||
RewardMasterPercent = 40
|
||||
RewardVoterPercent = 50
|
||||
|
|
@ -16,14 +14,7 @@ const (
|
|||
LimitPenaltyEpoch = 4
|
||||
BlocksPerYear = uint64(15768000)
|
||||
LimitThresholdNonceInQueue = 10
|
||||
DefaultMinGasPrice = 2500
|
||||
MergeSignRange = 15
|
||||
RangeReturnSigner = 90
|
||||
MinGasPrice = 2500
|
||||
)
|
||||
|
||||
var TIP2019Block = big.NewInt(1050000)
|
||||
var TIPEVMSignerBlock = big.NewInt(2500000)
|
||||
var IsTestnet bool = false
|
||||
var StoreRewardFolder string
|
||||
var RollbackHash Hash
|
||||
var MinGasPrice int64
|
||||
|
|
@ -35,11 +35,6 @@ const (
|
|||
RandomizeSMC = "0x0000000000000000000000000000000000000090"
|
||||
FoudationAddr = "0x0000000000000000000000000000000000000068"
|
||||
TeamAddr = "0x0000000000000000000000000000000000000099"
|
||||
VoteMethod = "0x6dd7d8ea"
|
||||
UnvoteMethod = "0x02aa9be2"
|
||||
ProposeMethod = "0x01267951"
|
||||
ResignMethod = "0xae6e43f5"
|
||||
SignMethod = "0xe341eaa4"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
@ -50,11 +45,6 @@ var (
|
|||
// Hash represents the 32 byte Keccak256 hash of arbitrary data.
|
||||
type Hash [HashLength]byte
|
||||
|
||||
type Vote struct {
|
||||
Masternode Address
|
||||
Voter Address
|
||||
}
|
||||
|
||||
func BytesToHash(b []byte) Hash {
|
||||
var h Hash
|
||||
h.SetBytes(b)
|
||||
|
|
@ -291,4 +281,4 @@ func ExtractAddressFromBytes(bytePenalties []byte) []Address {
|
|||
copy(penalties[i][:], bytePenalties[i*AddressLength:])
|
||||
}
|
||||
return penalties
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue