mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-25 21:17:16 +00:00
Added BigCopy
This commit is contained in:
parent
9d06f9e6fb
commit
8fa19664e6
@ -41,3 +41,12 @@ func BigToBytes(num *big.Int, base int) []byte {
|
|||||||
|
|
||||||
return append(ret[:len(ret)-len(num.Bytes())], num.Bytes()...)
|
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
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user