Multisig signrawtransaction fails

Multisig signrawtransaction fails

I have 3 private keys (a,b,c) which belong to an address (2 of 3) from which I want to spend funds using RPC commands.

I´ve started with generating the redeemScript using createmultisig() and the pub keys which I have generated from the 3 priv Keys (using bitwasp). As the result returns the correct address this step seems to be correct.

After importing the address to my node and rescanning the blockchain I execute listunspend() to get the unspend outputs for my rawtransaction.

Now I generate the raw tx using

createrawtransaction({txid,vout,scriptPubKey,redeemScript},{address:amount})

Here the result:

020000000195b96fa7fff141564feba34cb669bdeb94953c98ae864465623def3fbe9e9fb10100000000ffffffff01e87a01000000000017a9145766fcbfc6927c0b027e4b4245fffcb1ec16f64b8700000000

Now I start with signing this raw transaction

signrawtransaction(rawtx,{txid,vout,scriptPubKey,redeemScript},privKey1)

The result of this signing process is used for the second step

signrawtransaction(signedrawtx,{txid,vout,scriptPubKey,redeemScript},privKey2)

The first signing step returns "Operation not valid with the current stack size" which, as far as I know is correct if a multisig address is involved and not enough keys have signed the tx.

The second step returns "Signature must be zero for failed CHECK(MULTI)SIG operation" which I don´t understand. What's going wrong here? Even if I change the used priv keys and use the second or third key for the first signing step and one other for the second the error still persits. Am I missing a thing?

https://ift.tt/2MHXVpR

Comments

Popular posts from this blog

bitcoin node: what is the difference between simnet and regtest?

How to check if Electrum is masking my IP with the Tor proxy?

Need help to recover blpckchain.info wallet, my wife forgot her password and the brute force with btcrecover is not catching the password