routerrpc: expose preimage on the htlc level

This commit is contained in:
Joost Jager 2020-04-09 09:51:37 +02:00
parent 185813abb1
commit 8e7c0757ec
No known key found for this signature in database
GPG Key ID: A61B9D4C393C59C7
5 changed files with 757 additions and 733 deletions

View File

@ -214,6 +214,11 @@
"failure": {
"$ref": "#/definitions/lnrpcFailure",
"description": "Detailed htlc failure info."
},
"preimage": {
"type": "string",
"format": "byte",
"description": "The preimage that was used to settle the HTLC."
}
}
},

View File

@ -872,6 +872,7 @@ func (r *RouterBackend) MarshalHTLCAttempt(
rpcAttempt.ResolveTimeNs = MarshalTimeNano(
htlc.Settle.SettleTime,
)
rpcAttempt.Preimage = htlc.Settle.Preimage[:]
case htlc.Failure != nil:
rpcAttempt.Status = lnrpc.HTLCAttempt_FAILED

File diff suppressed because it is too large Load Diff

View File

@ -2998,6 +2998,9 @@ message HTLCAttempt {
// Detailed htlc failure info.
Failure failure = 5;
// The preimage that was used to settle the HTLC.
bytes preimage = 6;
}
message ListPaymentsRequest {

View File

@ -2944,6 +2944,11 @@
"failure": {
"$ref": "#/definitions/lnrpcFailure",
"description": "Detailed htlc failure info."
},
"preimage": {
"type": "string",
"format": "byte",
"description": "The preimage that was used to settle the HTLC."
}
}
},