Skip to content

Commit 1af9cb7

Browse files
committed
staticaddr: don't rename swapserverrpc to looprpc
1 parent 6d3f65a commit 1af9cb7

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

staticaddr/loopin/actions.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
"github.com/lightninglabs/loop/staticaddr/deposit"
2020
"github.com/lightninglabs/loop/staticaddr/version"
2121
"github.com/lightninglabs/loop/swap"
22-
looprpc "github.com/lightninglabs/loop/swapserverrpc"
22+
"github.com/lightninglabs/loop/swapserverrpc"
2323
"github.com/lightningnetwork/lnd/chainntnfs"
2424
"github.com/lightningnetwork/lnd/input"
2525
"github.com/lightningnetwork/lnd/invoices"
@@ -117,7 +117,7 @@ func (f *FSM) InitHtlcAction(ctx context.Context,
117117
version.CurrentRPCProtocolVersion(),
118118
)
119119

120-
loopInReq := &looprpc.ServerStaticAddressLoopInRequest{
120+
loopInReq := &swapserverrpc.ServerStaticAddressLoopInRequest{
121121
SwapHash: f.loopIn.SwapHash[:],
122122
DepositOutpoints: f.loopIn.DepositOutpoints,
123123
HtlcClientPubKey: f.loopIn.ClientPubkey.SerializeCompressed(),
@@ -144,7 +144,7 @@ func (f *FSM) InitHtlcAction(ctx context.Context,
144144
// attempt.
145145
pushEmptySigs := func() {
146146
_, err = f.cfg.Server.PushStaticAddressHtlcSigs(
147-
ctx, &looprpc.PushStaticAddressHtlcSigsRequest{
147+
ctx, &swapserverrpc.PushStaticAddressHtlcSigsRequest{
148148
SwapHash: f.loopIn.SwapHash[:],
149149
},
150150
)
@@ -382,17 +382,17 @@ func (f *FSM) SignHtlcTxAction(ctx context.Context,
382382
}
383383

384384
// Push htlc tx sigs to server.
385-
pushHtlcReq := &looprpc.PushStaticAddressHtlcSigsRequest{
385+
pushHtlcReq := &swapserverrpc.PushStaticAddressHtlcSigsRequest{
386386
SwapHash: f.loopIn.SwapHash[:],
387-
StandardHtlcInfo: &looprpc.ClientHtlcSigningInfo{
387+
StandardHtlcInfo: &swapserverrpc.ClientHtlcSigningInfo{
388388
Nonces: clientHtlcNonces,
389389
Sigs: htlcSigs,
390390
},
391-
HighFeeHtlcInfo: &looprpc.ClientHtlcSigningInfo{
391+
HighFeeHtlcInfo: &swapserverrpc.ClientHtlcSigningInfo{
392392
Nonces: highFeeNonces,
393393
Sigs: htlcSigsHighFee,
394394
},
395-
ExtremeFeeHtlcInfo: &looprpc.ClientHtlcSigningInfo{
395+
ExtremeFeeHtlcInfo: &swapserverrpc.ClientHtlcSigningInfo{
396396
Nonces: extremelyHighNonces,
397397
Sigs: htlcSigsExtremelyHighFee,
398398
},

staticaddr/loopin/manager.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import (
1919
"github.com/lightninglabs/loop/labels"
2020
"github.com/lightninglabs/loop/staticaddr/deposit"
2121
"github.com/lightninglabs/loop/swapserverrpc"
22-
looprpc "github.com/lightninglabs/loop/swapserverrpc"
2322
"github.com/lightningnetwork/lnd/lntypes"
2423
"github.com/lightningnetwork/lnd/routing/route"
2524
)
@@ -34,7 +33,7 @@ const (
3433
type Config struct {
3534
// Server is the client that is used to communicate with the static
3635
// address server.
37-
Server looprpc.StaticAddressServerClient
36+
Server swapserverrpc.StaticAddressServerClient
3837

3938
// AddressManager gives the withdrawal manager access to static address
4039
// parameters.
@@ -232,7 +231,7 @@ func (m *Manager) notifyNotFinished(ctx context.Context, swapHash lntypes.Hash,
232231
txId chainhash.Hash) error {
233232

234233
_, err := m.cfg.Server.PushStaticAddressSweeplessSigs(
235-
ctx, &looprpc.PushStaticAddressSweeplessSigsRequest{
234+
ctx, &swapserverrpc.PushStaticAddressSweeplessSigsRequest{
236235
SwapHash: swapHash[:],
237236
Txid: txId[:],
238237
ErrorMessage: SwapNotFinishedMsg,
@@ -332,7 +331,7 @@ func (m *Manager) handleLoopInSweepReq(ctx context.Context,
332331

333332
// We'll now sign for every deposit that is part of the loop-in.
334333
responseMap := make(
335-
map[string]*looprpc.ClientSweeplessSigningInfo,
334+
map[string]*swapserverrpc.ClientSweeplessSigningInfo,
336335
len(req.DepositToNonces),
337336
)
338337

@@ -394,16 +393,17 @@ func (m *Manager) handleLoopInSweepReq(ctx context.Context,
394393
return err
395394
}
396395

397-
responseMap[depositOutpoint] = &looprpc.ClientSweeplessSigningInfo{ //nolint:lll
396+
signingInfo := &swapserverrpc.ClientSweeplessSigningInfo{
398397
Nonce: musig2Session.PublicNonce[:],
399398
Sig: sig,
400399
}
400+
responseMap[depositOutpoint] = signingInfo
401401
}
402402

403403
txHash := sweepTx.TxHash()
404404

405405
_, err = m.cfg.Server.PushStaticAddressSweeplessSigs(
406-
ctx, &looprpc.PushStaticAddressSweeplessSigsRequest{
406+
ctx, &swapserverrpc.PushStaticAddressSweeplessSigsRequest{
407407
SwapHash: loopIn.SwapHash[:],
408408
Txid: txHash[:],
409409
SigningInfo: responseMap,

0 commit comments

Comments
 (0)