mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-27 08:56:18 +00:00
use 0x address scheme by default and add new enable xdc prefix flag (#518)
This commit is contained in:
parent
5d4ea760d5
commit
328176651c
10 changed files with 23 additions and 13 deletions
|
|
@ -81,5 +81,5 @@ XDC --ethstats ${netstats} --gcmode archive \
|
|||
--rpcvhosts "*" --unlock "${wallet}" --password /work/.pwd --mine \
|
||||
--gasprice "1" --targetgaslimit "420000000" --verbosity ${log_level} \
|
||||
--debugdatadir /work/xdcchain \
|
||||
--enable-0x-prefix --ws --wsaddr=0.0.0.0 --wsport $ws_port \
|
||||
--ws --wsaddr=0.0.0.0 --wsport $ws_port \
|
||||
--wsorigins "*" 2>&1 >>/work/xdcchain/xdc.log | tee -a /work/xdcchain/xdc.log
|
||||
|
|
|
|||
|
|
@ -80,5 +80,5 @@ XDC --ethstats ${netstats} --gcmode archive \
|
|||
--rpcvhosts "*" --unlock "${wallet}" --password /work/.pwd --mine \
|
||||
--gasprice "1" --targetgaslimit "420000000" --verbosity ${log_level} \
|
||||
--debugdatadir /work/xdcchain \
|
||||
--enable-0x-prefix --ws --wsaddr=0.0.0.0 --wsport $ws_port \
|
||||
--ws --wsaddr=0.0.0.0 --wsport $ws_port \
|
||||
--wsorigins "*" 2>&1 >>/work/xdcchain/xdc.log | tee -a /work/xdcchain/xdc.log
|
||||
|
|
|
|||
|
|
@ -82,5 +82,5 @@ XDC --ethstats ${netstats} --gcmode archive \
|
|||
--rpcvhosts "*" --unlock "${wallet}" --password /work/.pwd --mine \
|
||||
--gasprice "1" --targetgaslimit "420000000" --verbosity ${log_level} \
|
||||
--debugdatadir /work/xdcchain \
|
||||
--enable-0x-prefix --ws --wsaddr=0.0.0.0 --wsport $ws_port \
|
||||
--ws --wsaddr=0.0.0.0 --wsport $ws_port \
|
||||
--wsorigins "*" 2>&1 >>/work/xdcchain/xdc.log | tee -a /work/xdcchain/xdc.log
|
||||
|
|
|
|||
|
|
@ -164,8 +164,8 @@ func makeConfigNode(ctx *cli.Context) (*node.Node, XDCConfig) {
|
|||
common.TIPXDCXCancellationFee = common.TIPXDCXCancellationFeeTestnet
|
||||
}
|
||||
|
||||
if ctx.GlobalBool(utils.Enable0xPrefixFlag.Name) {
|
||||
common.Enable0xPrefix = true
|
||||
if ctx.GlobalBool(utils.EnableXDCPrefixFlag.Name) {
|
||||
common.Enable0xPrefix = false
|
||||
}
|
||||
|
||||
// Rewound
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ const (
|
|||
// Tests that a node embedded within a console can be started up properly and
|
||||
// then terminated by closing the input stream.
|
||||
func TestConsoleWelcome(t *testing.T) {
|
||||
coinbase := "xdc8605cdbbdb6d264aa742e77020dcbc58fcdce182"
|
||||
coinbase := "0x8605cdbbdb6d264aa742e77020dcbc58fcdce182"
|
||||
|
||||
// Start a XDC console, make sure it's cleaned up and terminate the console
|
||||
XDC := runXDC(t,
|
||||
|
|
@ -75,7 +75,7 @@ at block: 0 ({{niltime}})
|
|||
// Tests that a console can be attached to a running node via various means.
|
||||
func TestIPCAttachWelcome(t *testing.T) {
|
||||
// Configure the instance for IPC attachement
|
||||
coinbase := "xdc8605cdbbdb6d264aa742e77020dcbc58fcdce182"
|
||||
coinbase := "0x8605cdbbdb6d264aa742e77020dcbc58fcdce182"
|
||||
var ipc string
|
||||
if runtime.GOOS == "windows" {
|
||||
ipc = `\\.\pipe\XDC` + strconv.Itoa(trulyRandInt(100000, 999999))
|
||||
|
|
@ -97,7 +97,7 @@ func TestIPCAttachWelcome(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestHTTPAttachWelcome(t *testing.T) {
|
||||
coinbase := "xdc8605cdbbdb6d264aa742e77020dcbc58fcdce182"
|
||||
coinbase := "0x8605cdbbdb6d264aa742e77020dcbc58fcdce182"
|
||||
port := strconv.Itoa(trulyRandInt(1024, 65536)) // Yeah, sometimes this will fail, sorry :P
|
||||
XDC := runXDC(t,
|
||||
"--XDCx.datadir", tmpdir(t)+"XDCx/"+time.Now().String(),
|
||||
|
|
@ -112,7 +112,7 @@ func TestHTTPAttachWelcome(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestWSAttachWelcome(t *testing.T) {
|
||||
coinbase := "xdc8605cdbbdb6d264aa742e77020dcbc58fcdce182"
|
||||
coinbase := "0x8605cdbbdb6d264aa742e77020dcbc58fcdce182"
|
||||
port := strconv.Itoa(trulyRandInt(1024, 65536)) // Yeah, sometimes this will fail, sorry :P
|
||||
|
||||
XDC := runXDC(t,
|
||||
|
|
|
|||
|
|
@ -114,6 +114,7 @@ var (
|
|||
//utils.VMEnableDebugFlag,
|
||||
utils.XDCTestnetFlag,
|
||||
utils.Enable0xPrefixFlag,
|
||||
utils.EnableXDCPrefixFlag,
|
||||
utils.RewoundFlag,
|
||||
utils.NetworkIdFlag,
|
||||
utils.RPCCORSDomainFlag,
|
||||
|
|
|
|||
|
|
@ -117,7 +117,11 @@ var (
|
|||
}
|
||||
Enable0xPrefixFlag = cli.BoolFlag{
|
||||
Name: "enable-0x-prefix",
|
||||
Usage: "Addres use 0x-prefix (default = false)",
|
||||
Usage: "Addres use 0x-prefix (Deprecated: this is on by default, to use xdc prefix use --enable-xdc-prefix)",
|
||||
}
|
||||
EnableXDCPrefixFlag = cli.BoolFlag{
|
||||
Name: "enable-xdc-prefix",
|
||||
Usage: "Addres use xdc-prefix (default = false)",
|
||||
}
|
||||
// General settings
|
||||
AnnounceTxsFlag = cli.BoolFlag{
|
||||
|
|
@ -786,6 +790,10 @@ func setIPC(ctx *cli.Context, cfg *node.Config) {
|
|||
}
|
||||
}
|
||||
|
||||
func setPrefix(ctx *cli.Context, cfg *node.Config) {
|
||||
checkExclusive(ctx, Enable0xPrefixFlag, EnableXDCPrefixFlag)
|
||||
}
|
||||
|
||||
// MakeDatabaseHandles raises out the number of allowed file handles per process
|
||||
// for XDC and returns half of the allowance to assign to the database.
|
||||
func MakeDatabaseHandles() int {
|
||||
|
|
@ -933,6 +941,7 @@ func SetNodeConfig(ctx *cli.Context, cfg *node.Config) {
|
|||
setHTTP(ctx, cfg)
|
||||
setWS(ctx, cfg)
|
||||
setNodeUserIdent(ctx, cfg)
|
||||
setPrefix(ctx, cfg)
|
||||
|
||||
switch {
|
||||
case ctx.GlobalIsSet(DataDirFlag.Name):
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ var ShanghaiBlock = big.NewInt(9999999999)
|
|||
|
||||
var TIPXDCXTestnet = big.NewInt(38383838)
|
||||
var IsTestnet bool = false
|
||||
var Enable0xPrefix bool = false
|
||||
var Enable0xPrefix bool = true
|
||||
var StoreRewardFolder string
|
||||
var RollbackHash Hash
|
||||
var BasePrice = big.NewInt(1000000000000000000) // 1
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ var ShanghaiBlock = big.NewInt(16832700)
|
|||
|
||||
var TIPXDCXTestnet = big.NewInt(0)
|
||||
var IsTestnet bool = false
|
||||
var Enable0xPrefix bool = false
|
||||
var Enable0xPrefix bool = true
|
||||
var StoreRewardFolder string
|
||||
var RollbackHash Hash
|
||||
var BasePrice = big.NewInt(1000000000000000000) // 1
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ var ShanghaiBlock = big.NewInt(61290000) // Target 31st March 2024
|
|||
|
||||
var TIPXDCXTestnet = big.NewInt(23779191)
|
||||
var IsTestnet bool = false
|
||||
var Enable0xPrefix bool = false
|
||||
var Enable0xPrefix bool = true
|
||||
var StoreRewardFolder string
|
||||
var RollbackHash Hash
|
||||
var BasePrice = big.NewInt(1000000000000000000) // 1
|
||||
|
|
|
|||
Loading…
Reference in a new issue