mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 04:36:42 +00:00
common: improve function ExtractAddressFromBytes, close XFN-15 (#1658)
This commit is contained in:
parent
8ed7b1cb63
commit
b05fcd02b9
1 changed files with 1 additions and 1 deletions
|
|
@ -401,7 +401,7 @@ func ExtractAddressToBytes(penalties []Address) []byte {
|
||||||
}
|
}
|
||||||
|
|
||||||
func ExtractAddressFromBytes(bytePenalties []byte) []Address {
|
func ExtractAddressFromBytes(bytePenalties []byte) []Address {
|
||||||
if bytePenalties != nil && len(bytePenalties) < AddressLength {
|
if len(bytePenalties) < AddressLength {
|
||||||
return []Address{}
|
return []Address{}
|
||||||
}
|
}
|
||||||
penalties := make([]Address, len(bytePenalties)/AddressLength)
|
penalties := make([]Address, len(bytePenalties)/AddressLength)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue