XDCxlending: fix staticcheck warning S1008: simplify returning boolean expression

This commit is contained in:
Daniel Liu 2024-10-30 09:19:21 +08:00
parent a8f8a7abd3
commit 2db2f9d1f7
2 changed files with 2 additions and 8 deletions

View file

@ -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 {

View file

@ -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 {