common: fix documentation of Address.SetBytes (#21814)

This commit is contained in:
Pascal Dierich 2020-11-16 14:08:13 +01:00 committed by GitHub
parent cf856ea1ad
commit 92c56eb820
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -240,7 +240,7 @@ func (a Address) Format(s fmt.State, c rune) {
} }
// SetBytes sets the address to the value of b. // SetBytes sets the address to the value of b.
// If b is larger than len(a) it will panic. // If b is larger than len(a), b will be cropped from the left.
func (a *Address) SetBytes(b []byte) { func (a *Address) SetBytes(b []byte) {
if len(b) > len(a) { if len(b) > len(a) {
b = b[len(b)-AddressLength:] b = b[len(b)-AddressLength:]