all: fix typos, close XFN-23 #1725

This commit is contained in:
Daniel Liu 2025-11-20 14:56:27 +08:00 committed by benjamin202410
parent c7fbbe4b4d
commit f9d8738f2a
10 changed files with 37 additions and 37 deletions

View file

@ -74,35 +74,35 @@ type constant struct {
// variables for specific networks, copy values from maintnet constant to pass tests
var (
BlackListHFNumber = MaintnetConstant.blackListHFNumber
MaxMasternodesV2 = MaintnetConstant.maxMasternodesV2 // Last v1 masternodes
BlackListHFNumber = MainnetConstant.blackListHFNumber
MaxMasternodesV2 = MainnetConstant.maxMasternodesV2 // Last v1 masternodes
TIP2019Block = MaintnetConstant.tip2019Block
TIPSigning = MaintnetConstant.tipSigning
TIPRandomize = MaintnetConstant.tipRandomize
TIPNoHalvingMNReward = MaintnetConstant.tipNoHalvingMNReward
TIPXDCX = MaintnetConstant.tipXDCX
TIPXDCXLending = MaintnetConstant.tipXDCXLending
TIPXDCXCancellationFee = MaintnetConstant.tipXDCXCancellationFee
TIPTRC21Fee = MaintnetConstant.tipTRC21Fee
TIPIncreaseMasternodes = MaintnetConstant.tipIncreaseMasternodes
BerlinBlock = MaintnetConstant.berlinBlock
LondonBlock = MaintnetConstant.londonBlock
MergeBlock = MaintnetConstant.mergeBlock
ShanghaiBlock = MaintnetConstant.shanghaiBlock
BlockNumberGas50x = MaintnetConstant.blockNumberGas50x
TIPXDCXMinerDisable = MaintnetConstant.tipXDCXMinerDisable
TIPXDCXReceiverDisable = MaintnetConstant.tipXDCXReceiverDisable
Eip1559Block = MaintnetConstant.eip1559Block
CancunBlock = MaintnetConstant.cancunBlock
TIP2019Block = MainnetConstant.tip2019Block
TIPSigning = MainnetConstant.tipSigning
TIPRandomize = MainnetConstant.tipRandomize
TIPNoHalvingMNReward = MainnetConstant.tipNoHalvingMNReward
TIPXDCX = MainnetConstant.tipXDCX
TIPXDCXLending = MainnetConstant.tipXDCXLending
TIPXDCXCancellationFee = MainnetConstant.tipXDCXCancellationFee
TIPTRC21Fee = MainnetConstant.tipTRC21Fee
TIPIncreaseMasternodes = MainnetConstant.tipIncreaseMasternodes
BerlinBlock = MainnetConstant.berlinBlock
LondonBlock = MainnetConstant.londonBlock
MergeBlock = MainnetConstant.mergeBlock
ShanghaiBlock = MainnetConstant.shanghaiBlock
BlockNumberGas50x = MainnetConstant.blockNumberGas50x
TIPXDCXMinerDisable = MainnetConstant.tipXDCXMinerDisable
TIPXDCXReceiverDisable = MainnetConstant.tipXDCXReceiverDisable
Eip1559Block = MainnetConstant.eip1559Block
CancunBlock = MainnetConstant.cancunBlock
TRC21IssuerSMC = MaintnetConstant.trc21IssuerSMC
XDCXListingSMC = MaintnetConstant.xdcxListingSMC
RelayerRegistrationSMC = MaintnetConstant.relayerRegistrationSMC
LendingRegistrationSMC = MaintnetConstant.lendingRegistrationSMC
TRC21IssuerSMC = MainnetConstant.trc21IssuerSMC
XDCXListingSMC = MainnetConstant.xdcxListingSMC
RelayerRegistrationSMC = MainnetConstant.relayerRegistrationSMC
LendingRegistrationSMC = MainnetConstant.lendingRegistrationSMC
ignoreSignerCheckBlockArray = MaintnetConstant.ignoreSignerCheckBlockArray
blacklist = MaintnetConstant.blacklist
ignoreSignerCheckBlockArray = MainnetConstant.ignoreSignerCheckBlockArray
blacklist = MainnetConstant.blacklist
)
func IsIgnoreSignerCheckBlock(blockNumber uint64) bool {

View file

@ -4,7 +4,7 @@ import (
"math/big"
)
var MaintnetConstant = constant{
var MainnetConstant = constant{
chainID: 50,
blackListHFNumber: 38383838,
maxMasternodesV2: 108,

View file

@ -286,7 +286,7 @@ func (x *XDPoS_v2) hygieneVotePool() {
}
// Clean up any votes round that is 10 rounds older
if keyedRound < int64(round)-utils.PoolHygieneRound {
log.Debug("[hygieneVotePool] Cleaned vote poll at round", "Round", keyedRound, "currentRound", round, "Key", k)
log.Debug("[hygieneVotePool] Cleaned vote pool at round", "Round", keyedRound, "currentRound", round, "Key", k)
x.votePool.ClearByPoolKey(k)
}
}

View file

@ -27,7 +27,7 @@ import (
)
var (
// ErrBadProDAOExtra is returned if a header doens't support the DAO fork on a
// ErrBadProDAOExtra is returned if a header doesn't support the DAO fork on a
// pro-fork client.
ErrBadProDAOExtra = errors.New("bad DAO pro-fork extra-data")

View file

@ -57,7 +57,7 @@ func newTxJournal(path string) *journal {
// load parses a transaction journal dump from disk, loading its contents into
// the specified pool.
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 doesn't exist at all
if _, err := os.Stat(journal.path); os.IsNotExist(err) {
return nil
}

View file

@ -43,7 +43,7 @@ func newLendingTxJournal(path string) *lendingtxJournal {
// load parses a transaction journal dump from disk, loading its contents into
// the specified pool.
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 doesn't exist at all
if _, err := os.Stat(journal.path); os.IsNotExist(err) {
return nil
}

View file

@ -495,7 +495,7 @@ func (h *priceHeap) Pop() interface{} {
}
// pricedList is a price-sorted heap to allow operating on transactions pool
// contents in a price-incrementing way. It's built opon the all transactions
// contents in a price-incrementing way. It's built upon the all transactions
// in txpool but only interested in the remote part. It means only remote transactions
// will be considered for tracking, sorting, eviction, etc.
//

View file

@ -43,7 +43,7 @@ func newOrderTxJournal(path string) *ordertxJournal {
// load parses a transaction journal dump from disk, loading its contents into
// the specified pool.
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 doesn't exist at all
if _, err := os.Stat(journal.path); os.IsNotExist(err) {
return nil
}

View file

@ -469,13 +469,13 @@ func recoverPlain(sighash common.Hash, R, S, Vb *big.Int, homestead bool) (commo
if !crypto.ValidateSignatureValues(V, R, S, homestead) {
return common.Address{}, ErrInvalidSig
}
// encode the snature in uncompressed format
// encode the signature in uncompressed format
r, s := R.Bytes(), S.Bytes()
sig := make([]byte, crypto.SignatureLength)
copy(sig[32-len(r):32], r)
copy(sig[64-len(s):64], s)
sig[64] = V
// recover the public key from the snature
// recover the public key from the signature
pub, err := crypto.Ecrecover(sighash[:], sig)
if err != nil {
return common.Address{}, err

View file

@ -195,8 +195,8 @@ var (
Gap: 450,
FoudationWalletAddr: common.HexToAddress("xdc92a289fe95a85c53b8d0d113cbaef0c1ec98ac65"),
V2: &V2{
SwitchEpoch: common.MaintnetConstant.TIPV2SwitchBlock.Uint64() / 900,
SwitchBlock: common.MaintnetConstant.TIPV2SwitchBlock,
SwitchEpoch: common.MainnetConstant.TIPV2SwitchBlock.Uint64() / 900,
SwitchBlock: common.MainnetConstant.TIPV2SwitchBlock,
CurrentConfig: MainnetV2Configs[0],
AllConfigs: MainnetV2Configs,
},