mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-03 10:12:28 +02: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:
@@ -265,11 +265,7 @@ func (r *Manager) getHtlcAmtLimits(tx kvdb.RTx, chanPoint wire.OutPoint) (
|
||||
func makeFailureItem(outPoint wire.OutPoint, updateFailure lnrpc.UpdateFailure,
|
||||
errStr string) *lnrpc.FailedUpdate {
|
||||
|
||||
outpoint := &lnrpc.OutPoint{
|
||||
TxidBytes: outPoint.Hash[:],
|
||||
TxidStr: outPoint.Hash.String(),
|
||||
OutputIndex: outPoint.Index,
|
||||
}
|
||||
outpoint := lnrpc.MarshalOutPoint(&outPoint)
|
||||
|
||||
return &lnrpc.FailedUpdate{
|
||||
Outpoint: outpoint,
|
||||
|
Reference in New Issue
Block a user