mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-12-02 08:59:27 +01:00
multi: refactor testFundingPersistence
This commit refactors the test `testFundingPersistence`. In addition, it also changes the old `OpenChannelAssertPending` method and adds a new method `OpenChannelAssertStream` for clarity.
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/lightningnetwork/lnd/lnrpc"
|
||||
"github.com/lightningnetwork/lnd/lntest"
|
||||
)
|
||||
|
||||
@@ -92,3 +93,16 @@ func ParseDerivationPath(path string) ([]uint32, error) {
|
||||
|
||||
return indices, nil
|
||||
}
|
||||
|
||||
// ChanPointFromPendingUpdate constructs a channel point from a lnrpc pending
|
||||
// update.
|
||||
func ChanPointFromPendingUpdate(pu *lnrpc.PendingUpdate) *lnrpc.ChannelPoint {
|
||||
chanPoint := &lnrpc.ChannelPoint{
|
||||
FundingTxid: &lnrpc.ChannelPoint_FundingTxidBytes{
|
||||
FundingTxidBytes: pu.Txid,
|
||||
},
|
||||
OutputIndex: pu.OutputIndex,
|
||||
}
|
||||
|
||||
return chanPoint
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user