Explorar o código

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

Pascal Dierich %!s(int64=5) %!d(string=hai) anos
pai
achega
92c56eb820
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      common/types.go

+ 1 - 1
common/types.go

@@ -240,7 +240,7 @@ func (a Address) Format(s fmt.State, c rune) {
 }
 
 // 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) {
 	if len(b) > len(a) {
 		b = b[len(b)-AddressLength:]