MCPcopy Create free account
hub / github.com/ElementsProject/lightning / GenChannel

Class GenChannel

tests/utils.py:487–510  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

485
486
487class GenChannel(object):
488 class Half(object):
489 def __init__(self, enabled=True, htlc_min=0, htlc_max=None, basefee=0, propfee=1, delay=6):
490 self.enabled = enabled
491 self.htlc_min = htlc_min
492 self.htlc_max = htlc_max
493 self.basefee = basefee
494 self.propfee = propfee
495 self.delay = delay
496
497 def __init__(self, node1, node2, capacity_sats=1000000, forward=None, reverse=None):
498 """We fill in htlc_max on half to == capacity, if not set"""
499 self.node1 = node1
500 self.node2 = node2
501 if forward is None:
502 forward = GenChannel.Half()
503 if reverse is None:
504 reverse = GenChannel.Half()
505 if forward.htlc_max is None:
506 forward.htlc_max = capacity_sats * 1000
507 if reverse.htlc_max is None:
508 reverse.htlc_max = capacity_sats * 1000
509 self.capacity_sats = capacity_sats
510 self.half = [forward, reverse]
511
512
513def generate_gossip_store(channels, nodemap={}):

Callers 15

test_node_bias_routesFunction · 0.90
test_getroutesFunction · 0.90
test_getroutes_maxdelayFunction · 0.90
test_sourcefree_on_modsFunction · 0.90
test_limits_fake_gossmapFunction · 0.90
test_max_htlcFunction · 0.90

Calls

no outgoing calls

Tested by 15

test_node_bias_routesFunction · 0.72
test_getroutesFunction · 0.72
test_getroutes_maxdelayFunction · 0.72
test_sourcefree_on_modsFunction · 0.72
test_limits_fake_gossmapFunction · 0.72
test_max_htlcFunction · 0.72