You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Everything seems ok when running the script and it even shows Verified as True but when I try to send it through bitcoin-cli I get a "non-mandatory-script-verify-flag (Witness program hash mismatch)" error.
I think I'm making a mistake signing my inputs but I'm not sure how, I checked the private key multiple times and it does match the address that currently holds the UTXO.
Can anyone advise what to do?
EDIT:
I just tried creating the same transaction manually with Sparrow using the same wallets and they look very different, I'm able to send the one from sparrow just fine:
I'm trying to send a fairly simple segwit transaction with multiple input and outputs, here's how the simplified code looks like:
Everything seems ok when running the script and it even shows
Verified
asTrue
but when I try to send it through bitcoin-cli I get a "non-mandatory-script-verify-flag (Witness program hash mismatch)" error.I think I'm making a mistake signing my inputs but I'm not sure how, I checked the private key multiple times and it does match the address that currently holds the UTXO.
Can anyone advise what to do?
EDIT:
I just tried creating the same transaction manually with Sparrow using the same wallets and they look very different, I'm able to send the one from sparrow just fine:
Sparrow (raw unsigned)
0200000001d2dd566a9e981a28798a1adc40fc541e93f98a65c79007dc99380a40ee23b94a7d00000000f400000002083110000000000022512020ca63a7c2a2cb8312c9108dad1146c45bd642e2db626da4adc19a1b22ab97399c3b00000000000022512027c66cb5bad28febfdf97bde021707d70abea10a7e88c21361ac958d62930a6500000000
Sparrow (raw signed)
02000000000101d2dd566a9e981a28798a1adc40fc541e93f98a65c79007dc99380a40ee23b94a7d00000000f400000002083110000000000022512020ca63a7c2a2cb8312c9108dad1146c45bd642e2db626da4adc19a1b22ab97399c3b00000000000022512027c66cb5bad28febfdf97bde021707d70abea10a7e88c21361ac958d62930a65014076dca5b3231f6bca4b2142f2f388158f57ec61845edc34358f4b8d9da9532810512cbac2bb9ff49905c15f1a7bafab8cb9e7aa6a9761f9e8f611207a048b7c1600000000
bitcoinlib (raw unsigned)
02000000000101d2dd566a9e981a28798a1adc40fc541e93f98a65c79007dc99380a40ee23b94a7d00000000f4000000029c3b00000000000022512027c66cb5bad28febfdf97bde021707d70abea10a7e88c21361ac958d62930a65083110000000000022512020ca63a7c2a2cb8312c9108dad1146c45bd642e2db626da4adc19a1b22ab97390000000000
bitcoinlib (raw signed)
02000000000101d2dd566a9e981a28798a1adc40fc541e93f98a65c79007dc99380a40ee23b94a7d0000006a47304402203a0962afe594a0f1d15ff1b8a55e72c566157c1ac02af659509c925b9122d83e02207533c881f368c89be823fbcaed39a431670b9a6c141829bf8f57c73b00eb0c3e0121023f5bdab1fb426681f1a020998ffc69c844f380fe6e0d67b73e7fc9bc3291018bf4000000029c3b00000000000022512027c66cb5bad28febfdf97bde021707d70abea10a7e88c21361ac958d62930a65083110000000000022512020ca63a7c2a2cb8312c9108dad1146c45bd642e2db626da4adc19a1b22ab97390000000000
EDIT 2:
If I add
script_type="p2wpkh"
to my inputs then the transaction looks more similar to Sparrow's but the witness data is completely different:Sparrow
bitcoinlib
The text was updated successfully, but these errors were encountered: