Skip to content

Commit fcdd5fe

Browse files
committed
cmd/loop: add initiator to swap requests
1 parent 481839b commit fcdd5fe

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

cmd/loop/loopin.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ func loopIn(ctx *cli.Context) error {
150150
ExternalHtlc: external,
151151
HtlcConfTarget: htlcConfTarget,
152152
Label: label,
153+
Initiator: defaultInitiator,
153154
}
154155

155156
if ctx.IsSet(lastHopFlag.Name) {

cmd/loop/loopout.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ func loopOut(ctx *cli.Context) error {
195195
HtlcConfirmations: htlcConfs,
196196
SwapPublicationDeadline: uint64(swapDeadline.Unix()),
197197
Label: label,
198+
Initiator: defaultInitiator,
198199
})
199200
if err != nil {
200201
return err

cmd/loop/main.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ var (
4848
// that we set when sending it over the line.
4949
defaultMacaroonTimeout int64 = 60
5050

51+
// defaultInitiator is the default value for the "initiator" part of the
52+
// user agent string we send when using the command line utility.
53+
defaultInitiator = "loop-cli"
54+
5155
loopDirFlag = cli.StringFlag{
5256
Name: "loopdir",
5357
Value: loopd.LoopDirBase,

0 commit comments

Comments
 (0)