diff options
author | kiel barry <kiel.j.barry@gmail.com> | 2018-05-29 18:42:21 +0800 |
---|---|---|
committer | Felix Lange <fjl@users.noreply.github.com> | 2018-05-29 18:42:21 +0800 |
commit | 84f8c0cc1fbe1ab9c128555392a82ba609820fef (patch) | |
tree | 4859fe37105cc88d4d338a9f5bc55e42a017a29f /common/math/big.go | |
parent | 998f6564b28ea9241d0052c2abee090d2b9a8b63 (diff) | |
download | dexon-84f8c0cc1fbe1ab9c128555392a82ba609820fef.tar.gz dexon-84f8c0cc1fbe1ab9c128555392a82ba609820fef.tar.zst dexon-84f8c0cc1fbe1ab9c128555392a82ba609820fef.zip |
common: improve documentation comments (#16701)
This commit adds many comments and removes unused code.
It also removes the EmptyHash function, which had some uses
but was silly.
Diffstat (limited to 'common/math/big.go')
-rw-r--r-- | common/math/big.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/common/math/big.go b/common/math/big.go index 787278650..dbf2770a9 100644 --- a/common/math/big.go +++ b/common/math/big.go @@ -78,7 +78,7 @@ func ParseBig256(s string) (*big.Int, bool) { return bigint, ok } -// MustParseBig parses s as a 256 bit big integer and panics if the string is invalid. +// MustParseBig256 parses s as a 256 bit big integer and panics if the string is invalid. func MustParseBig256(s string) *big.Int { v, ok := ParseBig256(s) if !ok { @@ -186,9 +186,8 @@ func U256(x *big.Int) *big.Int { func S256(x *big.Int) *big.Int { if x.Cmp(tt255) < 0 { return x - } else { - return new(big.Int).Sub(x, tt256) } + return new(big.Int).Sub(x, tt256) } // Exp implements exponentiation by squaring. |