diff --git a/pkg/pipeline/helpers.go b/pkg/pipeline/helpers.go deleted file mode 100644 index d045332..0000000 --- a/pkg/pipeline/helpers.go +++ /dev/null @@ -1,10 +0,0 @@ -package pipeline - -import "math/big" - -// bigIntRatio calculates a ratio of a big int. -func bigIntRatio(i *big.Int, ratio float64) *big.Int { - r := big.NewFloat(ratio) - bump, _ := r.Mul(r, new(big.Float).SetInt(i)).Int(nil) - return bump -} diff --git a/pkg/pipeline/helpers_test.go b/pkg/pipeline/helpers_test.go deleted file mode 100644 index f6af323..0000000 --- a/pkg/pipeline/helpers_test.go +++ /dev/null @@ -1,21 +0,0 @@ -package pipeline - -import ( - "math/big" - "testing" - - "github.com/stretchr/testify/require" -) - -func TestBigIntRatio(t *testing.T) { - ten := big.NewInt(10) - - ratio := bigIntRatio(ten, 0.1) - require.Equal(t, big.NewInt(1), ratio) - - ratio = bigIntRatio(ten, 1.0) - require.Equal(t, big.NewInt(10), ratio) - - ratio = bigIntRatio(ten, 2.0) - require.Equal(t, big.NewInt(20), ratio) -}