aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/test_framework/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'qa/rpc-tests/test_framework/util.py')
-rw-r--r--qa/rpc-tests/test_framework/util.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/qa/rpc-tests/test_framework/util.py b/qa/rpc-tests/test_framework/util.py
index 23c55ad698..b7e90a8a8b 100644
--- a/qa/rpc-tests/test_framework/util.py
+++ b/qa/rpc-tests/test_framework/util.py
@@ -405,3 +405,6 @@ def assert_raises(exc, fun, *args, **kwds):
raise AssertionError("Unexpected exception raised: "+type(e).__name__)
else:
raise AssertionError("No exception raised")
+
+def satoshi_round(amount):
+ return Decimal(amount).quantize(Decimal('0.00000001'), rounding=ROUND_DOWN)