mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-02 09:42:31 +02:00
channeldb+funding: move opening channel state to DB
The funding manager doesn't need to know the details of the underlying storage of the opening channel state, so we move the actual store and retrieval into the channel database.
This commit is contained in:
@@ -922,12 +922,12 @@ func assertDatabaseState(t *testing.T, node *testNode,
|
||||
}
|
||||
state, _, err = node.fundingMgr.getChannelOpeningState(
|
||||
fundingOutPoint)
|
||||
if err != nil && err != ErrChannelNotFound {
|
||||
if err != nil && err != channeldb.ErrChannelNotFound {
|
||||
t.Fatalf("unable to get channel state: %v", err)
|
||||
}
|
||||
|
||||
// If we found the channel, check if it had the expected state.
|
||||
if err != ErrChannelNotFound && state == expectedState {
|
||||
if err != channeldb.ErrChannelNotFound && state == expectedState {
|
||||
// Got expected state, return with success.
|
||||
return
|
||||
}
|
||||
@@ -1165,7 +1165,7 @@ func assertErrChannelNotFound(t *testing.T, node *testNode,
|
||||
}
|
||||
state, _, err = node.fundingMgr.getChannelOpeningState(
|
||||
fundingOutPoint)
|
||||
if err == ErrChannelNotFound {
|
||||
if err == channeldb.ErrChannelNotFound {
|
||||
// Got expected state, return with success.
|
||||
return
|
||||
} else if err != nil {
|
||||
|
Reference in New Issue
Block a user