lightningd: move common "can I send HTLC" checks into send_htlc_out.

The pay.c ones were out of date, so unify.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2017-06-20 15:44:03 +09:30
parent fa91394ec7
commit e3debe5adb
3 changed files with 42 additions and 42 deletions

View File

@@ -31,9 +31,10 @@ int peer_sending_commitsig(struct peer *peer, const u8 *msg);
int peer_got_commitsig(struct peer *peer, const u8 *msg);
int peer_got_revoke(struct peer *peer, const u8 *msg);
struct htlc_out *send_htlc_out(struct peer *out, u64 amount, u32 cltv,
const struct sha256 *payment_hash,
const u8 *onion_routing_packet,
struct htlc_in *in,
struct pay_command *pc);
enum onion_type send_htlc_out(struct peer *out, u64 amount, u32 cltv,
const struct sha256 *payment_hash,
const u8 *onion_routing_packet,
struct htlc_in *in,
struct pay_command *pc,
struct htlc_out **houtp);
#endif /* LIGHTNING_LIGHTNINGD_PEER_HTLCS_H */