routing: invalid channels updatechanpolicy call

This commit is contained in:
ErikEk
2021-06-19 03:47:06 +02:00
parent 03bce2129b
commit 46e9481e6c
9 changed files with 1787 additions and 1342 deletions

View File

@@ -66,3 +66,22 @@ func NewUtxoFromProto(utxo *lnrpc.Utxo) *Utxo {
Confirmations: utxo.Confirmations,
}
}
// FailedUpdate displays information about a failed update, including its
// address, reason and update error.
type FailedUpdate struct {
OutPoint OutPoint `json:"outpoint"`
Reason string `json:"reason"`
UpdateError string `json:"update_error"`
}
// NewFailedUpdateFromProto creates a display from the FailedUpdate
// proto. This filters out the raw txid bytes from the provided outpoint,
// which will otherwise be printed in base64.
func NewFailedUpdateFromProto(update *lnrpc.FailedUpdate) *FailedUpdate {
return &FailedUpdate{
OutPoint: NewOutPointFromProto(update.Outpoint),
Reason: update.Reason.String(),
UpdateError: update.UpdateError,
}
}