| 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 |