spec: update to experimental BOLTs with secret/total_amount.

Also pulls in a new onion error (mpp_timeout).  We change our
route_step_decode_end() to always return the total_msat and optional
secret.

We check total_amount (to prohibit mpp), but we do nothing with
secret for now other than hand it to the htlc_accepted hook.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2019-11-23 10:49:23 +10:30
parent 50d6941e89
commit ebac3d2a85
9 changed files with 128 additions and 11 deletions

View File

@@ -89,6 +89,8 @@ struct route_step {
struct amount_msat *amt_to_forward;
u32 *outgoing_cltv;
struct short_channel_id *forward_channel;
struct secret *payment_secret;
struct amount_msat *total_msat;
};
/**
@@ -243,10 +245,12 @@ void sphinx_add_nonfinal_hop(struct sphinx_path *path,
/**
* Add a final hop to the path.
*/
void sphinx_add_final_hop(struct sphinx_path *path,
bool sphinx_add_final_hop(struct sphinx_path *path,
const struct pubkey *pubkey,
bool use_tlv,
struct amount_msat forward,
u32 outgoing_cltv);
u32 outgoing_cltv,
struct amount_msat total_msat,
const struct secret *payment_secret);
#endif /* LIGHTNING_COMMON_SPHINX_H */