common: use struct onionreply.

This makes it clear we're dealing with a message which is a wrapped error
reply (needing unwrap_onionreply), not an already-wrapped one.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2020-01-23 10:08:04 +10:30
parent aa6aad0131
commit 1099f6a5e1
27 changed files with 126 additions and 90 deletions

View File

@@ -17,6 +17,8 @@
#include <wallet/wallet.h>
#include <wire/gen_onion_wire.h>
struct onionreply;
bool notifications_have_topic(const char *topic);
struct notification {
@@ -61,7 +63,7 @@ void notify_sendpay_success(struct lightningd *ld,
void notify_sendpay_failure(struct lightningd *ld,
const struct wallet_payment *payment,
int pay_errcode,
const u8 *onionreply,
const struct onionreply *onionreply,
const struct routing_failure *fail,
const char *errmsg);