mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +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
|
||||
}
|
||||
_, err = l.StateCache.OpenTrie(root)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
return err == nil
|
||||
}
|
||||
|
||||
func (l *Lending) GetTriegc() *prque.Prque {
|
||||
|
|
|
|||
|
|
@ -41,10 +41,7 @@ func IsResignedRelayer(relayer common.Address, statedb *state.StateDB) bool {
|
|||
slot := RelayerMappingSlot["RESIGN_REQUESTS"]
|
||||
locBig := GetLocMappingAtKey(relayer.Hash(), slot)
|
||||
locHash := common.BigToHash(locBig)
|
||||
if statedb.GetState(common.HexToAddress(common.RelayerRegistrationSMC), locHash) != (common.Hash{}) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
return statedb.GetState(common.HexToAddress(common.RelayerRegistrationSMC), locHash) != (common.Hash{})
|
||||
}
|
||||
|
||||
func GetBaseTokenLength(relayer common.Address, statedb *state.StateDB) uint64 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue