I am using Bitcoin core 0.14.1 testnet. I created a Segwit address. transfer some coins to this address. Now I want to spend it. I created a raw transaction using console command i.e. createrawtransaction. Now I want to sign it. I tried using usual way i.e
signrawtransaction 'hex_got_from_rawtx' '[{"txid":"","vout": index,"scriptPubkey":"","redeemScript":""}]' '["Private_key_of_address_used_in_segwit_address"]'
I am getting the error is: "witness program hash mismatch"
Any idea how can I get rid of it?
addwitnessaddress
?addwitnessaddress
an address from the Bitcoin Core wallet or from elsewhere?