mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-23 15:22:38 +02:00
chanfunding: introduce NewShimIntent for testing
This is needed so that the next commit can create a ShimIntent without having to export the ShimIntent's fields.
This commit is contained in:
parent
0cf3552515
commit
5e6ebf561b
@ -10,6 +10,22 @@ import (
|
|||||||
"github.com/lightningnetwork/lnd/keychain"
|
"github.com/lightningnetwork/lnd/keychain"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// NewShimIntent creates a new ShimIntent. This is only used for testing.
|
||||||
|
func NewShimIntent(localAmt, remoteAmt btcutil.Amount,
|
||||||
|
localKey *keychain.KeyDescriptor, remoteKey *btcec.PublicKey,
|
||||||
|
chanPoint *wire.OutPoint, thawHeight uint32, musig2 bool) *ShimIntent {
|
||||||
|
|
||||||
|
return &ShimIntent{
|
||||||
|
localFundingAmt: localAmt,
|
||||||
|
remoteFundingAmt: remoteAmt,
|
||||||
|
localKey: localKey,
|
||||||
|
remoteKey: remoteKey,
|
||||||
|
chanPoint: chanPoint,
|
||||||
|
thawHeight: thawHeight,
|
||||||
|
musig2: musig2,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ShimIntent is an intent created by the CannedAssembler which represents a
|
// ShimIntent is an intent created by the CannedAssembler which represents a
|
||||||
// funding output to be created that was constructed outside the wallet. This
|
// funding output to be created that was constructed outside the wallet. This
|
||||||
// might be used when a hardware wallet, or a channel factory is the entity
|
// might be used when a hardware wallet, or a channel factory is the entity
|
||||||
|
Loading…
x
Reference in New Issue
Block a user