From 3f90f7c89856f5d024eec1df535a4fc2871214c2 Mon Sep 17 00:00:00 2001 From: obscuren Date: Sat, 1 Nov 2014 02:14:55 +0100 Subject: Signextend --- ethutil/big.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ethutil/big.go') diff --git a/ethutil/big.go b/ethutil/big.go index bdcf86421..8d7b3fe70 100644 --- a/ethutil/big.go +++ b/ethutil/big.go @@ -34,6 +34,10 @@ func BigD(data []byte) *big.Int { return n } +func BitTest(num *big.Int, i int) bool { + return num.Bit(i) > 0 +} + // To256 // // "cast" the big int to a 256 big int (i.e., limit to) -- cgit v1.2.3