aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/test_framework/util.py')
-rw-r--r--test/functional/test_framework/util.py20
1 files changed, 0 insertions, 20 deletions
diff --git a/test/functional/test_framework/util.py b/test/functional/test_framework/util.py
index 5eeb67c00a..2c227922c5 100644
--- a/test/functional/test_framework/util.py
+++ b/test/functional/test_framework/util.py
@@ -15,7 +15,6 @@ import os
import random
import re
import time
-import unittest
from . import coverage
from .authproxy import AuthServiceProxy, JSONRPCException
@@ -537,22 +536,3 @@ def find_vout_for_address(node, txid, addr):
if addr == tx["vout"][i]["scriptPubKey"]["address"]:
return i
raise RuntimeError("Vout not found for address: txid=%s, addr=%s" % (txid, addr))
-
-def modinv(a, n):
- """Compute the modular inverse of a modulo n using the extended Euclidean
- Algorithm. See https://en.wikipedia.org/wiki/Extended_Euclidean_algorithm#Modular_integers.
- """
- return pow(a, -1, n)
-
-class TestFrameworkUtil(unittest.TestCase):
- def test_modinv(self):
- test_vectors = [
- [7, 11],
- [11, 29],
- [90, 13],
- [1891, 3797],
- [6003722857, 77695236973],
- ]
-
- for a, n in test_vectors:
- self.assertEqual(modinv(a, n), pow(a, n-2, n))