def METHOD_NAME(num, inv_q, done_q, report_q):
    """Runner which checks that invs didn't fail (TOO_MANY_HTLCS!), and requeues if they did!"""
    for i in range(num):
        inv = done_q.get()
        try:
            res = l1.waitsendpay(inv['payment_hash'])
        except RpcError:
            report_q.put('f')
            if not args.fail_pay and not args.fail_forward:
                inv_q.put(inv)
            continue
        assert res['status'] == 'complete'
        report_q.put('w')