mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-20 13:44:31 +00:00
common: improve function ExtractAddressFromBytes, close XFN-15 (#1658)
This commit is contained in:
parent
09b66ea8c4
commit
4aafff2826
1 changed files with 1 additions and 1 deletions
|
|
@ -409,7 +409,7 @@ func ExtractAddressToBytes(penalties []Address) []byte {
|
|||
}
|
||||
|
||||
func ExtractAddressFromBytes(bytePenalties []byte) []Address {
|
||||
if bytePenalties != nil && len(bytePenalties) < AddressLength {
|
||||
if len(bytePenalties) < AddressLength {
|
||||
return []Address{}
|
||||
}
|
||||
penalties := make([]Address, len(bytePenalties)/AddressLength)
|
||||
|
|
|
|||
Loading…
Reference in a new issue