test/functional/wallet_avoidreuse.py
def assert_unspent(node, total_count=None, total_sum=None, reused_supported=None, reused_count=None, reused_sum=None):
    '''Make assertions about a node's unspent output statistics'''
    stats = count_unspent(node)
    if total_count is not None:
        assert_equal(stats["total"]["count"], total_count)
    if total_sum is not None:
        assert_approx(stats["total"]["sum"], total_sum, 0.001)
    if reused_supported is not None:
        assert_equal(stats["reused"]["supported"], reused_supported)
    if reused_count is not None:
        assert_equal(stats["reused"]["count"], reused_count)
    if reused_sum is not None:
        assert_approx(stats["reused"]["sum"], reused_sum, 0.001)
Make assertions about a node's unspent output statistics
Make assertions about a node's unspent output statistics
Make assertions about a node ' s unspent output statistics
def assert_unspent(node, total_count=None, total_sum=None, reused_supported=None, reused_count=None, reused_sum=None):
    stats = count_unspent(node)
    if total_count is not None:
        assert_equal(stats["total"]["count"], total_count)
    if total_sum is not None:
        assert_approx(stats["total"]["sum"], total_sum, 0.001)
    if reused_supported is not None:
        assert_equal(stats["reused"]["supported"], reused_supported)
    if reused_count is not None:
        assert_equal(stats["reused"]["count"], reused_count)
    if reused_sum is not None:
        assert_approx(stats["reused"]["sum"], reused_sum, 0.001)
def assert_unspent ( node , total_count = None , total_sum = None , reused_supported = None , reused_count = None , reused_sum = None ) : stats = count_unspent ( node ) if total_count is not None : assert_equal ( stats [ "total" ] [ "count" ] , total_count ) if total_sum is not None : assert_approx ( stats [ "total" ] [ "sum" ] , total_sum , 0.001 ) if reused_supported is not None : assert_equal ( stats [ "reused" ] [ "supported" ] , reused_supported ) if reused_count is not None : assert_equal ( stats [ "reused" ] [ "count" ] , reused_count ) if reused_sum is not None : assert_approx ( stats [ "reused" ] [ "sum" ] , reused_sum , 0.001 )
Make assertions about a node's unspent output statistics
Make assertions about a node ' s unspent output statistics
'''Make assertions about a node's unspent output statistics'''
node
total_count
total_sum
reused_supported
reused_count
reused_sum