IF (current_block_height < 400000)
{
check_multisig(2,3);
}
ELSE
{
usual OP_CHECKSIG condition;
}
There are many OP_XXX instructions, but there is no way to get current height of blockchain, or height of block where output script is stored.
May be there is easy way to get such data?
You example is not possible even with OP_CLTV. The nearest thing is:
OP_IF 23 OP_CHECKMULTISIG OP_ELSE 399999 OP_CLTV OP_DROP OP_CHECKSIG OP_ENDIF
IF (current_block_height < 400000)
{
check_multisig(2,3);
}
ELSE
{
(usual OP_CHECKSIG condition) OR (check_multisig(2,3));
}
At anytime, it could be spent with this scriptSig
01
When block height is >= 400000, by setting the nLockTime >= 399999, it could be spent with this scriptSig
0