mirror of
https://github.com/lightninglabs/pool.git
synced 2026-08-19 13:17:51 +02:00
multi: bump lnd+lndclient compile time dependency
This commit bumps the compile time dependency of lnd and lndclient to the 0.16.x branch. This makes the code forward compatible but does not yet change anything with respect to the minimum required version the user needs to run.
This commit is contained in:
parent
a4f9df5f20
commit
30c7ef6531
13 changed files with 370 additions and 166 deletions
|
|
@ -468,8 +468,9 @@ type TxSource interface {
|
|||
// limit the block range that we query over. These values can be left
|
||||
// as zero to include all blocks. To include unconfirmed transactions
|
||||
// in the query, endHeight must be set to -1.
|
||||
ListTransactions(ctx context.Context, startHeight,
|
||||
endHeight int32) ([]lndclient.Transaction, error)
|
||||
ListTransactions(ctx context.Context, startHeight, endHeight int32,
|
||||
opts ...lndclient.ListTransactionsOption) (
|
||||
[]lndclient.Transaction, error)
|
||||
}
|
||||
|
||||
// TxFeeEstimator is a type that provides us with a realistic fee estimation to
|
||||
|
|
|
|||
|
|
@ -270,18 +270,23 @@ func (m *MockTxSource) EXPECT() *MockTxSourceMockRecorder {
|
|||
}
|
||||
|
||||
// ListTransactions mocks base method.
|
||||
func (m *MockTxSource) ListTransactions(ctx context.Context, startHeight, endHeight int32) ([]lndclient.Transaction, error) {
|
||||
func (m *MockTxSource) ListTransactions(ctx context.Context, startHeight, endHeight int32, opts ...lndclient.ListTransactionsOption) ([]lndclient.Transaction, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "ListTransactions", ctx, startHeight, endHeight)
|
||||
varargs := []interface{}{ctx, startHeight, endHeight}
|
||||
for _, a := range opts {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "ListTransactions", varargs...)
|
||||
ret0, _ := ret[0].([]lndclient.Transaction)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// ListTransactions indicates an expected call of ListTransactions.
|
||||
func (mr *MockTxSourceMockRecorder) ListTransactions(ctx, startHeight, endHeight interface{}) *gomock.Call {
|
||||
func (mr *MockTxSourceMockRecorder) ListTransactions(ctx, startHeight, endHeight interface{}, opts ...interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListTransactions", reflect.TypeOf((*MockTxSource)(nil).ListTransactions), ctx, startHeight, endHeight)
|
||||
varargs := append([]interface{}{ctx, startHeight, endHeight}, opts...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListTransactions", reflect.TypeOf((*MockTxSource)(nil).ListTransactions), varargs...)
|
||||
}
|
||||
|
||||
// MockTxFeeEstimator is a mock of TxFeeEstimator interface.
|
||||
|
|
|
|||
|
|
@ -254,6 +254,8 @@ type mockWallet struct {
|
|||
chainfee.SatPerKWeight) (*wire.MsgTx, error)
|
||||
}
|
||||
|
||||
var _ lndclient.WalletKitClient = (*mockWallet)(nil)
|
||||
|
||||
func newMockWallet() *mockWallet {
|
||||
return &mockWallet{
|
||||
publishChan: make(chan *wire.MsgTx, 1),
|
||||
|
|
@ -312,7 +314,8 @@ func (w *mockWallet) NextAddr(context.Context, string,
|
|||
}
|
||||
|
||||
func (w *mockWallet) ListTransactions(context.Context, int32,
|
||||
int32) ([]lndclient.Transaction, error) {
|
||||
int32, ...lndclient.ListTransactionsOption) ([]lndclient.Transaction,
|
||||
error) {
|
||||
|
||||
return w.txs, nil
|
||||
}
|
||||
|
|
@ -327,8 +330,8 @@ func (w *mockWallet) interceptSendOutputs(f func(context.Context, []*wire.TxOut,
|
|||
w.sendOutputs = f
|
||||
}
|
||||
|
||||
func (w *mockWallet) ListUnspent(_ context.Context, _, _ int32) (
|
||||
[]*lnwallet.Utxo, error) {
|
||||
func (w *mockWallet) ListUnspent(context.Context, int32, int32,
|
||||
...lndclient.ListUnspentOption) ([]*lnwallet.Utxo, error) {
|
||||
|
||||
return w.utxos, nil
|
||||
}
|
||||
|
|
@ -446,7 +449,7 @@ func (w *mockWallet) FinalizePsbt(_ context.Context, packet *psbt.Packet,
|
|||
// MuSig2CreateSession creates a new musig session with the key and signers
|
||||
// provided.
|
||||
func (w *mockWallet) MuSig2CreateSession(_ context.Context,
|
||||
_ *keychain.KeyLocator, _ [][32]byte,
|
||||
version input.MuSig2Version, _ *keychain.KeyLocator, _ [][]byte,
|
||||
opts ...lndclient.MuSig2SessionOpts) (*input.MuSig2SessionInfo, error) {
|
||||
|
||||
var (
|
||||
|
|
@ -469,6 +472,7 @@ func (w *mockWallet) MuSig2CreateSession(_ context.Context,
|
|||
TaprootInternalKey: nil,
|
||||
HaveAllNonces: false,
|
||||
HaveAllSigs: false,
|
||||
Version: version,
|
||||
}
|
||||
|
||||
w.Lock()
|
||||
|
|
@ -565,6 +569,8 @@ type mockChainNotifier struct {
|
|||
errChan chan error
|
||||
}
|
||||
|
||||
var _ lndclient.ChainNotifierClient = (*mockChainNotifier)(nil)
|
||||
|
||||
func newMockChainNotifier() *mockChainNotifier {
|
||||
return &mockChainNotifier{
|
||||
confChan: make(chan *chainntnfs.TxConfirmation),
|
||||
|
|
@ -575,8 +581,9 @@ func newMockChainNotifier() *mockChainNotifier {
|
|||
}
|
||||
|
||||
func (n *mockChainNotifier) RegisterConfirmationsNtfn(ctx context.Context,
|
||||
txid *chainhash.Hash, pkScript []byte, numConfs,
|
||||
heightHint int32) (chan *chainntnfs.TxConfirmation, chan error, error) {
|
||||
txid *chainhash.Hash, pkScript []byte, numConfs, heightHint int32,
|
||||
opts ...lndclient.NotifierOption) (chan *chainntnfs.TxConfirmation,
|
||||
chan error, error) {
|
||||
|
||||
return n.confChan, n.errChan, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue