aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-02-28 19:19:21 +0800
committerobscuren <geffobscura@gmail.com>2014-02-28 19:19:21 +0800
commit8fa19664e657aca80446e6c3f7868f19ac717a07 (patch)
treeb140623d5237dde5935b61429fb6392128728095
parent9d06f9e6fbc20006df6812ed3feb5d8058c0b0a6 (diff)
downloaddexon-8fa19664e657aca80446e6c3f7868f19ac717a07.tar
dexon-8fa19664e657aca80446e6c3f7868f19ac717a07.tar.gz
dexon-8fa19664e657aca80446e6c3f7868f19ac717a07.tar.bz2
dexon-8fa19664e657aca80446e6c3f7868f19ac717a07.tar.lz
dexon-8fa19664e657aca80446e6c3f7868f19ac717a07.tar.xz
dexon-8fa19664e657aca80446e6c3f7868f19ac717a07.tar.zst
dexon-8fa19664e657aca80446e6c3f7868f19ac717a07.zip
Added BigCopy
-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
+}