channeldb/db: prevent filtering channels with unconfirmed close txs #2248
In this commit, we address an issue with the FetchWaitingCloseChannels
Related to #2217.
In this commit, we add a test case for FetchWaitingCloseChannels to ensure it behaves as intended. Currently, this test fails due to not fetching channels which are pending to be closed but are also pending to be opened. This will be fixed in the following commit and should allow the test to pass.
In this commit, we address an issue with the FetchWaitingCloseChannels method where it would not properly return channels that are unconfirmed and also have an unconfirmed closing transaction because they were filtered out. We fix this by fetching channels that remain unconfirmed that are also waiting for a confirmed closing transaction. This will allow the recently added test TestFetchWaitingCloseChannels to pass.