From 823b52802c96f9eb5669efb6c53a1462bfe3820f Mon Sep 17 00:00:00 2001 From: Joost Jager Date: Tue, 3 Sep 2019 11:45:51 +0200 Subject: [PATCH] record: add mpp String() --- record/mpp.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/record/mpp.go b/record/mpp.go index b28d10858..38877caf7 100644 --- a/record/mpp.go +++ b/record/mpp.go @@ -1,6 +1,7 @@ package record import ( + "fmt" "io" "github.com/lightningnetwork/lnd/lnwire" @@ -96,3 +97,8 @@ func (r *MPP) Record() tlv.Record { MPPOnionType, r, size, MPPEncoder, MPPDecoder, ) } + +// String returns a human-readable representation of the mpp payload field. +func (r *MPP) String() string { + return fmt.Sprintf("total=%v, addr=%x", r.totalMsat, r.paymentAddr) +}