mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 02:40:45 +00:00
XDCxlending: fix staticcheck warning S1008: simplify returning boolean expression
This commit is contained in:
parent
a8f8a7abd3
commit
2db2f9d1f7
2 changed files with 2 additions and 8 deletions
|
|
@ -684,10 +684,7 @@ func (l *Lending) HasLendingState(block *types.Block, author common.Address) boo
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
_, err = l.StateCache.OpenTrie(root)
|
_, err = l.StateCache.OpenTrie(root)
|
||||||
if err != nil {
|
return err == nil
|
||||||
return false
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l *Lending) GetTriegc() *prque.Prque {
|
func (l *Lending) GetTriegc() *prque.Prque {
|
||||||
|
|
|
||||||
|
|
@ -41,10 +41,7 @@ func IsResignedRelayer(relayer common.Address, statedb *state.StateDB) bool {
|
||||||
slot := RelayerMappingSlot["RESIGN_REQUESTS"]
|
slot := RelayerMappingSlot["RESIGN_REQUESTS"]
|
||||||
locBig := GetLocMappingAtKey(relayer.Hash(), slot)
|
locBig := GetLocMappingAtKey(relayer.Hash(), slot)
|
||||||
locHash := common.BigToHash(locBig)
|
locHash := common.BigToHash(locBig)
|
||||||
if statedb.GetState(common.HexToAddress(common.RelayerRegistrationSMC), locHash) != (common.Hash{}) {
|
return statedb.GetState(common.HexToAddress(common.RelayerRegistrationSMC), locHash) != (common.Hash{})
|
||||||
return true
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetBaseTokenLength(relayer common.Address, statedb *state.StateDB) uint64 {
|
func GetBaseTokenLength(relayer common.Address, statedb *state.StateDB) uint64 {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue