mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +01:00
bitcoin/script: don't pass value for HTLC script.
We don't need it. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -181,7 +181,6 @@ u8 *scriptpubkey_p2sh(const tal_t *ctx, const u8 *redeemscript)
|
|||||||
u8 *scriptpubkey_htlc_send(const tal_t *ctx,
|
u8 *scriptpubkey_htlc_send(const tal_t *ctx,
|
||||||
const struct pubkey *ourkey,
|
const struct pubkey *ourkey,
|
||||||
const struct pubkey *theirkey,
|
const struct pubkey *theirkey,
|
||||||
uint64_t value,
|
|
||||||
uint32_t htlc_abstimeout,
|
uint32_t htlc_abstimeout,
|
||||||
uint32_t locktime,
|
uint32_t locktime,
|
||||||
const struct sha256 *commit_revoke,
|
const struct sha256 *commit_revoke,
|
||||||
@@ -230,7 +229,6 @@ u8 *scriptpubkey_htlc_send(const tal_t *ctx,
|
|||||||
u8 *scriptpubkey_htlc_recv(const tal_t *ctx,
|
u8 *scriptpubkey_htlc_recv(const tal_t *ctx,
|
||||||
const struct pubkey *ourkey,
|
const struct pubkey *ourkey,
|
||||||
const struct pubkey *theirkey,
|
const struct pubkey *theirkey,
|
||||||
uint64_t value,
|
|
||||||
uint32_t htlc_abstimeout,
|
uint32_t htlc_abstimeout,
|
||||||
uint32_t locktime,
|
uint32_t locktime,
|
||||||
const struct sha256 *commit_revoke,
|
const struct sha256 *commit_revoke,
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ u8 *scriptsig_pay_to_pubkeyhash(const tal_t *ctx,
|
|||||||
u8 *scriptpubkey_htlc_send(const tal_t *ctx,
|
u8 *scriptpubkey_htlc_send(const tal_t *ctx,
|
||||||
const struct pubkey *ourkey,
|
const struct pubkey *ourkey,
|
||||||
const struct pubkey *theirkey,
|
const struct pubkey *theirkey,
|
||||||
uint64_t value,
|
|
||||||
uint32_t htlc_abstimeout,
|
uint32_t htlc_abstimeout,
|
||||||
uint32_t locktime,
|
uint32_t locktime,
|
||||||
const struct sha256 *commit_revoke,
|
const struct sha256 *commit_revoke,
|
||||||
@@ -51,7 +50,6 @@ u8 *scriptpubkey_htlc_send(const tal_t *ctx,
|
|||||||
u8 *scriptpubkey_htlc_recv(const tal_t *ctx,
|
u8 *scriptpubkey_htlc_recv(const tal_t *ctx,
|
||||||
const struct pubkey *ourkey,
|
const struct pubkey *ourkey,
|
||||||
const struct pubkey *theirkey,
|
const struct pubkey *theirkey,
|
||||||
uint64_t value,
|
|
||||||
uint32_t htlc_abstimeout,
|
uint32_t htlc_abstimeout,
|
||||||
uint32_t locktime,
|
uint32_t locktime,
|
||||||
const struct sha256 *commit_revoke,
|
const struct sha256 *commit_revoke,
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ static bool add_htlc(struct bitcoin_tx *tx, size_t n,
|
|||||||
u8 *(*scriptpubkeyfn)(const tal_t *,
|
u8 *(*scriptpubkeyfn)(const tal_t *,
|
||||||
const struct pubkey *,
|
const struct pubkey *,
|
||||||
const struct pubkey *,
|
const struct pubkey *,
|
||||||
uint64_t,
|
|
||||||
uint32_t,
|
uint32_t,
|
||||||
uint32_t,
|
uint32_t,
|
||||||
const struct sha256 *,
|
const struct sha256 *,
|
||||||
@@ -35,7 +34,7 @@ static bool add_htlc(struct bitcoin_tx *tx, size_t n,
|
|||||||
|
|
||||||
proto_to_sha256(h->r_hash, &htlc_rhash);
|
proto_to_sha256(h->r_hash, &htlc_rhash);
|
||||||
tx->output[n].script = scriptpubkey_p2sh(tx,
|
tx->output[n].script = scriptpubkey_p2sh(tx,
|
||||||
scriptpubkeyfn(tx, ourkey, theirkey, h->amount,
|
scriptpubkeyfn(tx, ourkey, theirkey,
|
||||||
htlc_abstime, locktime, rhash,
|
htlc_abstime, locktime, rhash,
|
||||||
&htlc_rhash));
|
&htlc_rhash));
|
||||||
tx->output[n].script_length = tal_count(tx->output[n].script);
|
tx->output[n].script_length = tal_count(tx->output[n].script);
|
||||||
|
|||||||
@@ -116,12 +116,12 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (received) {
|
if (received) {
|
||||||
redeemscript = scriptpubkey_htlc_recv(ctx, &pubkey1, &pubkey2,
|
redeemscript = scriptpubkey_htlc_recv(ctx, &pubkey1, &pubkey2,
|
||||||
u->amount, htlc_abstimeout,
|
htlc_abstimeout,
|
||||||
locktime, &revoke_hash,
|
locktime, &revoke_hash,
|
||||||
&htlc_rhash);
|
&htlc_rhash);
|
||||||
} else {
|
} else {
|
||||||
redeemscript = scriptpubkey_htlc_send(ctx, &pubkey1, &pubkey2,
|
redeemscript = scriptpubkey_htlc_send(ctx, &pubkey1, &pubkey2,
|
||||||
u->amount, htlc_abstimeout,
|
htlc_abstimeout,
|
||||||
locktime, &revoke_hash,
|
locktime, &revoke_hash,
|
||||||
&htlc_rhash);
|
&htlc_rhash);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user