I'm playing with OP_CHECKSEQUENCEVERIFY.
Here is my transaction that I'm trying to spend:
https://tchain.btc.com/e79d469698915aa6724288ae3a4141a31706d081f39fb7fd0b956a73a9044b22
which has the folowing redeem script:
2 OP_CHECKSEQUENCEVERIFY f45d94733d430261962932e0c847075195916a04 OP_CHECKSIG
But got an error when I broadcast it (after two block confirmations left):
mandatory-script-verify-flag-failed (Non-canonical DER signature) (code 16)
I have no issues to spend transaction if I:
- Just specify
2 CHECKLOCKTIMEVERIFY
(can spend anyone) - With standart transaction
HASH160 f45d94733d430261962932e0c847075195916a04 OP_EQUAL
but none with combination of them. Here is a signed transaction:
0200000001224b04a9736a950bfdb79ff381d00617a341413aae884272a65a919896469de7000000006b4830450221008801d7f0e402724b090133ec01a817e993675a44a871f1a3afc0dba730e24ea4022044097be610bece524e90a743fa9d060cd194079105e6f6d150265a1164e722c3012103e8546cfe53ca9014f6a352bc2e5c1f7cec1f5b344c73d4db3ed3b8f075d5c9ef020000000120a107000000000017a914f45d94733d430261962932e0c847075195916a048700000000
Can someone explain me what I'm doing wrong?
P.S. With the folowing redeem script (OP_DROP added)
https://tchain.btc.com/022d42355ac90e63f2667208112cf22471397dd2812645b5571da2d212596932
2 OP_CHECKSEQUENCEVERIFY OP_DROP f45d94733d430261962932e0c847075195916a04 OP_CHECKSIG
I got another error
(Script evaluated without error but finished with a false/empty top stack element) (code 16)
[UPDATED]:
https://tchain.btc.com/46894d9dd5e20147826523b1a3ac8e8c5c64603338430d04bd6f5846af2bb9b4
3 OP_CHECKSEQUENCEVERIFY OP_DROP OP_HASH160 f45d94733d430261962932e0c847075195916a04 OP_EQUAL
Then trying to broadcast this tx:
0200000001b4b92baf46586fbd040d43383360645c8c8eaca3b12365824701e2d59d4d8946000000006a47304402205649f715d2553cc4a66dd36a61b3c1b187d19f585bd40427d795c600373a45ab02203325ef44a3aae191ed3f2a90efe382d7992712c03f249f8dd61d8a30997806dc012103e8546cfe53ca9014f6a352bc2e5c1f7cec1f5b344c73d4db3ed3b8f075d5c9ef0300000001e00f97000000000017a914f45d94733d430261962932e0c847075195916a048700000000
I got
error code: -26
error message:
mandatory-script-verify-flag-failed (Script evaluated without error but finished with a false/empty top stack element) (code 16)
Here is a privatekey
cUB1iazKDHngknjpTHUfKtH9zNRvHn1aBMPJbK2s913zUegjkeNn
Can someone spend it?