Skip to content

Commit 27cc553

Browse files
committed
refactor: self-documenting return on success
1 parent 6fa25ca commit 27cc553

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

libevm/precompiles/p256verify/p256verify.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,11 @@ func (Precompile) Run(sig []byte) ([]byte, error) {
6161
if len(sig) != inputLen || !(*input)(sig).verify() {
6262
return nil, nil
6363
}
64-
return []byte{31: 1}, nil
64+
return bigEndianOne(), nil
65+
}
66+
67+
func bigEndianOne() []byte {
68+
return []byte{wordLen - 1: 1}
6569
}
6670

6771
func (in *input) verify() bool {

0 commit comments

Comments
 (0)