talaia-labs / rust-teos

The Eye of Satoshi - Lightning Watchtower
https://talaia.watch
MIT License
128 stars 62 forks source link

Replaces sleep based waiting for log entry lookups #167

Closed sr-gi closed 1 year ago

sr-gi commented 1 year ago

Replaces time.sleep in the watchtower-plugin tests to wait for certain things to happen on the backend by wait_for_logs, which should be less error-prone.

Also does some reformating and removes unnecessary imports.

Fixes #163 #156 #90

sr-gi commented 1 year ago

@booklearner you may be interested in this (b/c of #90)

sr-gi commented 1 year ago

I wanted to also address #156 here but I'm still unable to make it work consistently :(

booklearner commented 1 year ago

I was curious to see where wait_for_logs how implemented, adding here for reference: https://github.com/ElementsProject/lightning/blob/2ed10196d092d7aba22a700b0f26d248d04c36f7/contrib/pyln-testing/pyln/testing/utils.py#L303-L341

sr-gi commented 1 year ago

I've improved the regexs to look for to be a bit less broad in fddd477

sr-gi commented 1 year ago

I ended up managing to fix #156! 🎉