mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-21 14:10:35 +02:00
input+wallet: extract musig2 session management into new module
In this commit, we extract the musig2 session management into a new module. This allows us to re-use the session logic elsewhere in unit tests so we don't need to instantiate the entire wallet.
This commit is contained in:
@@ -32,7 +32,6 @@ import (
|
||||
"github.com/lightningnetwork/lnd/kvdb"
|
||||
"github.com/lightningnetwork/lnd/lnpeer"
|
||||
"github.com/lightningnetwork/lnd/lntest/channels"
|
||||
"github.com/lightningnetwork/lnd/lntest/mock"
|
||||
"github.com/lightningnetwork/lnd/lntest/wait"
|
||||
"github.com/lightningnetwork/lnd/lntypes"
|
||||
"github.com/lightningnetwork/lnd/lnwallet"
|
||||
@@ -337,8 +336,12 @@ func createTestChannel(t *testing.T, alicePrivKey, bobPrivKey []byte,
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
aliceSigner := &mock.SingleSigner{Privkey: aliceKeyPriv}
|
||||
bobSigner := &mock.SingleSigner{Privkey: bobKeyPriv}
|
||||
aliceSigner := input.NewMockSigner(
|
||||
[]*btcec.PrivateKey{aliceKeyPriv}, nil,
|
||||
)
|
||||
bobSigner := input.NewMockSigner(
|
||||
[]*btcec.PrivateKey{bobKeyPriv}, nil,
|
||||
)
|
||||
|
||||
alicePool := lnwallet.NewSigPool(runtime.NumCPU(), aliceSigner)
|
||||
channelAlice, err := lnwallet.NewLightningChannel(
|
||||
|
Reference in New Issue
Block a user