mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-03 22:34:21 +01:00
bitcoin_script: fix bug in complex anchor redeem script.
We need to pop off the stack after OP_CHECKSEQUENCEVERIFY. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#define OP_ELSE 0x67
|
||||
#define OP_ENDIF 0x68
|
||||
#define OP_DEPTH 0x74
|
||||
#define OP_DROP 0x75
|
||||
#define OP_DUP 0x76
|
||||
#define OP_EQUAL 0x87
|
||||
#define OP_EQUALVERIFY 0x88
|
||||
@@ -377,6 +378,7 @@ u8 *bitcoin_redeem_revocable(const tal_t *ctx,
|
||||
add_op(&script, OP_ELSE);
|
||||
add_push_bytes(&script, &locktime_le, sizeof(locktime_le));
|
||||
add_op(&script, OP_CHECKSEQUENCEVERIFY);
|
||||
add_op(&script, OP_DROP);
|
||||
add_push_key(&script, mykey);
|
||||
add_op(&script, OP_CHECKSIG);
|
||||
add_op(&script, OP_ENDIF);
|
||||
|
||||
Reference in New Issue
Block a user