def credit_reputation(target, asker): version = _reputation_cache_version() key = 'credit_reputation(%s,%s)' % (repr(target), repr(asker)) val = cache.get(key, version=version) if val is None: flow_graph = FlowGraph(target, asker, ignore_balances=True) val = flow_graph.max_flow() cache.set(key, val, None, version=version) return val
def max_payment(payer, recipient): flow_graph = FlowGraph(payer, recipient) return flow_graph.max_flow()