aboutsummaryrefslogtreecommitdiffstats
path: root/ethutil/big.go
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 /ethutil/big.go
parent9d06f9e6fbc20006df6812ed3feb5d8058c0b0a6 (diff)
downloadgo-tangerine-8fa19664e657aca80446e6c3f7868f19ac717a07.tar
go-tangerine-8fa19664e657aca80446e6c3f7868f19ac717a07.tar.gz
go-tangerine-8fa19664e657aca80446e6c3f7868f19ac717a07.tar.bz2
go-tangerine-8fa19664e657aca80446e6c3f7868f19ac717a07.tar.lz
go-tangerine-8fa19664e657aca80446e6c3f7868f19ac717a07.tar.xz
go-tangerine-8fa19664e657aca80446e6c3f7868f19ac717a07.tar.zst
go-tangerine-8fa19664e657aca80446e6c3f7868f19ac717a07.zip
Added BigCopy
Diffstat (limited to 'ethutil/big.go')
-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
+}