diff options
author | obscuren <geffobscura@gmail.com> | 2014-02-28 19:19:21 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-02-28 19:19:21 +0800 |
commit | 8fa19664e657aca80446e6c3f7868f19ac717a07 (patch) | |
tree | b140623d5237dde5935b61429fb6392128728095 /ethutil | |
parent | 9d06f9e6fbc20006df6812ed3feb5d8058c0b0a6 (diff) | |
download | go-tangerine-8fa19664e657aca80446e6c3f7868f19ac717a07.tar.gz go-tangerine-8fa19664e657aca80446e6c3f7868f19ac717a07.tar.zst go-tangerine-8fa19664e657aca80446e6c3f7868f19ac717a07.zip |
Added BigCopy
Diffstat (limited to 'ethutil')
-rw-r--r-- | ethutil/big.go | 9 |
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 +} |