mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-12-09 12:22:38 +01:00
multi: populate both string and byte TXID in lnrpc.Outpoint
This commit adds a a new `MarshalOutPoint` helper in the `lnrpc` package that can be used to convert a `wire.Outpoint` to an `lnrpc.Outpoint`. By using this helper, we are less likely to forget to populate both the string and byte form of the TXID.
This commit is contained in:
@@ -4496,11 +4496,7 @@ func rpcChannelResolution(report *channeldb.ResolverReport) (*lnrpc.Resolution,
|
||||
|
||||
res := &lnrpc.Resolution{
|
||||
AmountSat: uint64(report.Amount),
|
||||
Outpoint: &lnrpc.OutPoint{
|
||||
OutputIndex: report.OutPoint.Index,
|
||||
TxidStr: report.OutPoint.Hash.String(),
|
||||
TxidBytes: report.OutPoint.Hash[:],
|
||||
},
|
||||
Outpoint: lnrpc.MarshalOutPoint(&report.OutPoint),
|
||||
}
|
||||
|
||||
if report.SpendTxID != nil {
|
||||
|
||||
Reference in New Issue
Block a user