record: add mpp String()

This commit is contained in:
Joost Jager committed 2019-12-04 14:51:34 +01:00
1 parent fa010de548
commit 823b52802c
1 file changed
+6
+6
View File
@@ -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)
}