Firstly, let me show my version:

[frank@localhost bin]$ ./bitcoin-cli -version
Bitcoin Core RPC client version v0.16.1

After sendrawtransaction and I got:

error code: -26 error message: 64: non-mandatory-script-verify-flag (Signature must be zero for failed CHECK(MULTI)SIG operation)

And then, I try to decoderawtrsanaction the hex, and then I got the following output:

[frank@localhost bin]$ ./bitcoin-cli -regtest decoderawtransaction 020000000001018cc2f3c4f1af3ad60f3f3dcf5e3c3bfadb824e22aadec877f5a2bc4f99029dab0100000017160014c21bbdc4a642e391a6401bf30ac3e4e8e9669ea2ffffffff01605af4050000000017a914317fec65edbff6e4350fbe668cfedaf54ea9061587024730440220288b7912b6f6c0734ee34cada2c20fc81e8a7e11b4ccc9285b204eb25da953fa02205040878b44db8b17c8d62822c9124a4b154b46ccbd321fddfd52b9acd6742e1f032102efff391c5baf1433e2c488271ceebaa6eb2a203000ff62320de13d07b1ec4f4c00000000
  "txid": "42f6612dedacb4b5a24ffb75c07ae61eb939bb40c039fb165284bbac516b1e78",
  "hash": "6db7c04b006407655f55f2e64057d6ced61d34ee9b96ae9bcf5ead6dc311ecaf",
  "version": 2,
  "size": 215,
  "vsize": 134,
  "locktime": 0,
  "vin": [
      "txid": "ab9d02994fbca2f577c8deaa224e82dbfa3b3c5ecf3d3f0fd63aaff1c4f3c28c",
      "vout": 1,
      "scriptSig": {
        "asm": "0014c21bbdc4a642e391a6401bf30ac3e4e8e9669ea2",
        "hex": "160014c21bbdc4a642e391a6401bf30ac3e4e8e9669ea2"
      "txinwitness": [
      "sequence": 4294967295
  "vout": [
      "value": 0.99900000,
      "n": 0,
      "scriptPubKey": {
        "asm": "OP_HASH160 317fec65edbff6e4350fbe668cfedaf54ea90615 OP_EQUAL",
        "hex": "a914317fec65edbff6e4350fbe668cfedaf54ea9061587",
        "reqSigs": 1,
        "type": "scripthash",
        "addresses": [

I don't know what I missed? Any one know?

  • Are you on regtest? I didn’t see previous tx on testnet explorer... What command was used to create the raw tx? I also can see only one signature, is it the funding transaction? Jul 20, 2018 at 14:37
  • ah, yes, regtest... check that previous tx was not spent already, and maybe search the forum here for the word "mandatory" - this reveals several similar errors. Still I'd be interested to know, how tx was created (you may edit your post)... Jul 20, 2018 at 14:51
  • Yes, I run on regrets. I just simply listunspent and picks a transaction with only one confirmed. I followed the official guide, so I don't how to figure out.
    – Frank AK
    Jul 20, 2018 at 14:55
  • I still can't see how the multisig came into the game. bitcoin.org developer section guide? Or this from Gavin? gist.github.com/gavinandresen/3966071 - and here is similiar problem, with steps and solution in comments section: bitcoin.stackexchange.com/questions/69935/… Jul 20, 2018 at 15:03


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.