aboutsummaryrefslogtreecommitdiffstats
path: root/ethutil
diff options
context:
space:
mode:
Diffstat (limited to 'ethutil')
-rw-r--r--ethutil/big.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/ethutil/big.go b/ethutil/big.go
index c41d63add..1a3902fa3 100644
--- a/ethutil/big.go
+++ b/ethutil/big.go
@@ -41,3 +41,12 @@ func BigToBytes(num *big.Int, base int) []byte {
return append(ret[:len(ret)-len(num.Bytes())], num.Bytes()...)
}
+
+// Functions like the build in "copy" function
+// but works on big integers
+func BigCopy(src *big.Int) (ret *big.Int) {
+ ret = new(big.Int)
+ ret.Add(ret, src)
+
+ return
+}