diff --git a/account/payments.go b/account/payments.go index 3622e704..5c333eb6 100644 --- a/account/payments.go +++ b/account/payments.go @@ -395,6 +395,17 @@ func (a *Service) sendPayment(paymentHash string, payReq *lnrpc.PayReq, sendRequ return "", err } + if payReq != nil && len(payReq.RouteHints) == 1 && len(payReq.RouteHints[0].HopHints) == 1 { + lnclient.XImportMissionControl(context.Background(), &routerrpc.XImportMissionControlRequest{ + Pairs: []*routerrpc.PairHistory{{ + NodeFrom: []byte(payReq.RouteHints[0].HopHints[0].NodeId), + NodeTo: []byte(payReq.Destination), + History: &routerrpc.PairData{ + SuccessTime: time.Now().UnixNano(), + SuccessAmtMsat: payReq.NumMsat, + }, + }}}) + } a.log.Infof("sending payment with max fee = %v msat", sendRequest.FeeLimitMsat) response, err := lnclient.SendPaymentV2(context.Background(), sendRequest) if err != nil { diff --git a/go.mod b/go.mod index ff504404..0ce60fa2 100644 --- a/go.mod +++ b/go.mod @@ -46,7 +46,7 @@ replace ( github.com/btcsuite/btcwallet/walletdb => github.com/breez/btcwallet/walletdb v1.3.5-0.20210414123232-efee8e15b2ad github.com/btcsuite/btcwallet/wtxmgr => github.com/breez/btcwallet/wtxmgr v1.2.1-0.20210414123232-efee8e15b2ad github.com/lightninglabs/neutrino => github.com/breez/neutrino v0.11.1-0.20210510081759-0f2f35bed719 - github.com/lightningnetwork/lnd => github.com/breez/lnd v0.12.1-beta.rc6.0.20210622110244-3dc30928c3a2 + github.com/lightningnetwork/lnd => github.com/breez/lnd v0.12.1-beta.rc6.0.20210719131344-b444ae37125d github.com/lightningnetwork/lnd/cert => github.com/breez/lnd/cert v1.0.4-0.20210531094737-c875a5650e2b ) diff --git a/go.sum b/go.sum index e9f4495c..d634ddc3 100644 --- a/go.sum +++ b/go.sum @@ -129,6 +129,8 @@ github.com/breez/lnd v0.12.1-beta.rc6.0.20210531094737-c875a5650e2b h1:x3cjenF1b github.com/breez/lnd v0.12.1-beta.rc6.0.20210531094737-c875a5650e2b/go.mod h1:2GyP1IG1kXV5Af/LOCxnXfux1OP3fAGr8zptS5PB2YI= github.com/breez/lnd v0.12.1-beta.rc6.0.20210622110244-3dc30928c3a2 h1:sFycuqBmstyjWaifXtyN/txMRDL6z/ogL71g/nsksuI= github.com/breez/lnd v0.12.1-beta.rc6.0.20210622110244-3dc30928c3a2/go.mod h1:2GyP1IG1kXV5Af/LOCxnXfux1OP3fAGr8zptS5PB2YI= +github.com/breez/lnd v0.12.1-beta.rc6.0.20210719131344-b444ae37125d h1:GZ1GEkE9L/DbWM7vhjEsByO7IZqE2PeTzj/LZDJJOIA= +github.com/breez/lnd v0.12.1-beta.rc6.0.20210719131344-b444ae37125d/go.mod h1:2GyP1IG1kXV5Af/LOCxnXfux1OP3fAGr8zptS5PB2YI= github.com/breez/lnd/cert v1.0.4-0.20210418142716-88eb7459a966 h1:X91JwQ2LGJDQxZkSMYjelnsmMr+0rBTa0I2Nq5IDvWU= github.com/breez/lnd/cert v1.0.4-0.20210418142716-88eb7459a966/go.mod h1:3MWXVLLPI0Mg0XETm9fT4N9Vyy/8qQLmaM5589bEggM= github.com/breez/lnd/cert v1.0.4-0.20210418144450-b6bc19f0c4dd h1:oY27JwFZiaWiSP+m6VV71XK4F6mkQHXltLX4QGSV+AA=