record: add mpp String()

This commit is contained in:
Joost Jager 2019-09-03 11:45:51 +02:00
parent fa010de548
commit 823b52802c
No known key found for this signature in database
GPG Key ID: A61B9D4C393C59C7

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)
}