From 8fa19664e657aca80446e6c3f7868f19ac717a07 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 28 Feb 2014 12:19:21 +0100 Subject: [PATCH] Added BigCopy --- ethutil/big.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ethutil/big.go b/ethutil/big.go index c41d63add6..1a3902fa3e 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 +}