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

Method start

contrib/pyln-testing/pyln/testing/utils.py:921–929  ·  view source on GitHub ↗
(self, wait_for_bitcoind_sync=True, stderr_redir=False)

Source from the content-addressed store, hash-verified

919 return 'warning_bitcoind_sync' not in info and 'warning_lightningd_sync' not in info
920
921 def start(self, wait_for_bitcoind_sync=True, stderr_redir=False):
922 self.daemon.start(stderr_redir=stderr_redir)
923 # Cache `getinfo`, we'll be using it a lot
924 self.info = self.rpc.getinfo()
925 # This shortcut is sufficient for our simple tests.
926 self.port = self.info['binding'][0]['port']
927 self.gossip_store.open() # Reopen the gossip_store now that we should have one
928 if wait_for_bitcoind_sync and not self.is_synced_with_bitcoin(self.info):
929 wait_for(lambda: self.is_synced_with_bitcoin())
930
931 def stop(self, timeout=10):
932 """ Attempt to do a clean shutdown, but kill if it hangs

Callers 2

restartMethod · 0.95

Calls 5

wait_forFunction · 0.85
openMethod · 0.80
startMethod · 0.45
getinfoMethod · 0.45

Tested by 1