channel: remove enum channel_side, rename htlc_side to side.

We had enum channel_side (OURS, THEIRS) for which end of a channel we
had, and htlc_side (LOCAL, REMOTE) for who proposed the HTLC.

Combine these both into simply "enum side".

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-08-31 16:06:32 +09:30
parent f90fb4934f
commit d8af789bbb
14 changed files with 125 additions and 123 deletions

View File

@@ -12,20 +12,20 @@ u8 *wscript_for_htlc(const tal_t *ctx,
const struct peer *peer,
const struct htlc *h,
const struct sha256 *rhash,
enum htlc_side side);
enum side side);
/* Returns scriptpubkey: *wscript is NULL if it's a direct p2wpkh. */
u8 *commit_output_to_us(const tal_t *ctx,
const struct peer *peer,
const struct sha256 *rhash,
enum htlc_side side,
enum side side,
u8 **wscript);
/* Returns scriptpubkey: *wscript is NULL if it's a direct p2wpkh. */
u8 *commit_output_to_them(const tal_t *ctx,
const struct peer *peer,
const struct sha256 *rhash,
enum htlc_side side,
enum side side,
u8 **wscript);
/* Create commitment tx to spend the anchor tx output; doesn't fill in
@@ -34,6 +34,6 @@ struct bitcoin_tx *create_commit_tx(const tal_t *ctx,
struct peer *peer,
const struct sha256 *rhash,
const struct channel_state *cstate,
enum htlc_side side,
enum side side,
bool *otherside_only);
#endif