mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-10 23:14:27 +00:00
Merge pull request #237 from gzliudan/fix-empty-address
fix empty address
This commit is contained in:
commit
d2ce55ec96
3 changed files with 5 additions and 5 deletions
|
|
@ -10,7 +10,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
EmptyAddress = "0x0000000000000000000000000000000000000000"
|
EmptyAddress = "xdc0000000000000000000000000000000000000000"
|
||||||
EmptyRoot = common.HexToHash("56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421")
|
EmptyRoot = common.HexToHash("56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -238,7 +238,7 @@ func AttachConsensusV1Hooks(adaptor *XDPoS.XDPoS, bc *core.BlockChain, chainConf
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if address.String() != "0x0000000000000000000000000000000000000000" {
|
if address.String() != "xdc0000000000000000000000000000000000000000" {
|
||||||
candidates = append(candidates, utils.Masternode{Address: address, Stake: v})
|
candidates = append(candidates, utils.Masternode{Address: address, Stake: v})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -754,7 +754,7 @@ func (s *PublicBlockChainAPI) GetCandidateStatus(ctx context.Context, coinbaseAd
|
||||||
candidatesAddresses := state.GetCandidates(statedb)
|
candidatesAddresses := state.GetCandidates(statedb)
|
||||||
for _, address := range candidatesAddresses {
|
for _, address := range candidatesAddresses {
|
||||||
v := state.GetCandidateCap(statedb, address)
|
v := state.GetCandidateCap(statedb, address)
|
||||||
if address.String() != "0x0000000000000000000000000000000000000000" {
|
if address.String() != "xdc0000000000000000000000000000000000000000" {
|
||||||
candidates = append(candidates, utils.Masternode{Address: address, Stake: v})
|
candidates = append(candidates, utils.Masternode{Address: address, Stake: v})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -880,7 +880,7 @@ func (s *PublicBlockChainAPI) GetCandidates(ctx context.Context, epoch rpc.Epoch
|
||||||
candidatesAddresses := state.GetCandidates(statedb)
|
candidatesAddresses := state.GetCandidates(statedb)
|
||||||
for _, address := range candidatesAddresses {
|
for _, address := range candidatesAddresses {
|
||||||
v := state.GetCandidateCap(statedb, address)
|
v := state.GetCandidateCap(statedb, address)
|
||||||
if address.String() != "0x0000000000000000000000000000000000000000" {
|
if address.String() != "xdc0000000000000000000000000000000000000000" {
|
||||||
candidates = append(candidates, utils.Masternode{Address: address, Stake: v})
|
candidates = append(candidates, utils.Masternode{Address: address, Stake: v})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1009,7 +1009,7 @@ func (s *PublicBlockChainAPI) getCandidatesFromSmartContract() ([]utils.Masterno
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return []utils.Masternode{}, err
|
return []utils.Masternode{}, err
|
||||||
}
|
}
|
||||||
if candidate.String() != "0x0000000000000000000000000000000000000000" {
|
if candidate.String() != "xdc0000000000000000000000000000000000000000" {
|
||||||
candidatesWithStakeInfo = append(candidatesWithStakeInfo, utils.Masternode{Address: candidate, Stake: v})
|
candidatesWithStakeInfo = append(candidatesWithStakeInfo, utils.Masternode{Address: candidate, Stake: v})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue