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

Function write_dumb_template

tests/utils.py:531–543  ·  view source on GitHub ↗

We don't bother uniquifing, just one entry per chan dir

(outf, channels, propname, illegalvals=[])

Source from the content-addressed store, hash-verified

529 outf.write(val.to_bytes(8, byteorder='big'))
530
531 def write_dumb_template(outf, channels, propname, illegalvals=[]):
532 """We don't bother uniquifing, just one entry per chan dir"""
533 # Template is simply all the values
534 write_bignum(outf, len(channels) * 2)
535 for c in channels:
536 for d in (0, 1):
537 v = getattr(c.half[d], propname)
538 assert v not in illegalvals
539 write_bignum(outf, v)
540
541 # Now each entry for each channel half points into the values.
542 for i in range(0, len(channels) * 2):
543 write_bignum(outf, i)
544
545 # First create nodes
546 for c in channels:

Callers 1

generate_gossip_storeFunction · 0.85

Calls 1

write_bignumFunction · 0.85

Tested by

no test coverage detected