Bitcoin Forum
July 15, 2025, 06:07:23 PM *
News: Latest Bitcoin Core release: 29.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Locktime requirement not satisfied when locktime set to 1 in p2sh  (Read 105 times)
subredwes (OP)
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
May 06, 2018, 11:48:22 PM
 #1

Hey there!

I've created the following script on testnet:

OP_IF
    2 <pubkey1> <pubkey2> <pubkey3> 3
    OP_CHECKMULTISIG
OP_ELSE
    1 OP_CHECKSEQUENCEVERIFY
    OP_DROP
    <pubkey1> OP_CHECKSIG
OP_ENDIF

I am currently able to unlock the funds when I satisfy the 2 of 3 multisig condition.

However, when I attempt to unlock the funds using the else condition, I get the following error: 64: non-mandatory-script-verify-flag (Locktime requirement not satisfied)

This confuses me, because I thought I was setting the lock time to a block height of 1, which should have already passed.

Any help on this would be greatly appreciated! Thanks so much!

pebwindkraft
Sr. Member
****
Offline Offline

Activity: 257
Merit: 343


View Profile
May 09, 2018, 07:13:05 AM
 #2


This confuses me, because I thought I was setting the lock time to a block height of 1, which should have already passed.

You talk about the last field in a tx (nLockTime), or the stack item before the CSV command?
I think that nLockTime must not be set to the „relative“ block height of one... could you show the raw tax, so far as you got? The wiki explains to set nLockTime field to a higher value than the stack element for CSV, see here:
https://en.bitcoin.it/wiki/Script
I meant I read somewhere (just can‘t find the link), that LockTime cannot be the default „ffffffff“, it must be s.th. else.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!