Saturday, October 5, 2024

blockchain – Repair btc transaction’s dangerous information construction

i’ve drawback with my uncooked bitcoin transaction information construction, and after committing it i get error, some on web stated it is due to dangerous implementation of priv key and pub key and a few others stated it is due to dangerous information construction, so i am checking my information construction with stackoverflow group if it was good to go, i will work out the issue with my signing implementation alone.

this is the transaction i made and put 10000 satoshi in handle bc1qqs5lcmj58lmmfd6ap34xqqfuzfvz02nxjayrjx and that i need to ship 2500 to my self and 2500 again to the handle it got here from.

that is the info construction earlier than signing the tx:

01000000
01
14fe532eec4ddc9bfd8686a7234300c24a47c60e437ae26e966a43e47f947def
00000000
16
00140429fc6e543ff7b4b75d0c6a60013c125827aa66
ffffffff

02
c409000000000000
1976a9140429fc6e543ff7b4b75d0c6a60013c125827aa6688ac

c409000000000000
1976a9145951ac8720b1865ba633d19eaa6473afae7c46b388ac
00000000
01000000

and that is the info construction after signing it:

01000000
01
14fe532eec4ddc9bfd8686a7234300c24a47c60e437ae26e966a43e47f947def
00000000
6b48304402206b6fde1ca4cac9873f5f2c08edcdf65b621d4c5f49bf187bcd457e2bccbd4dfd02202002f6f82c98979a79efd54234691fdbda684bd33395d810a077effebb0e910f6f01210280a1bfa268074c9171ed0e30f332706789c5138e1428e92506e671b1997eb874
ffffffff

02c409000000000000
1976a9140429fc6e543ff7b4b75d0c6a60013c125827aa6688ac
c409000000000000
1976a9145951ac8720b1865ba633d19eaa6473afae7c46b388ac
00000000

i get error : “Code: -26, Error: non-mandatory-script-verify-flag (Witness requires empty scriptSig)”

i did analysis on the error however the anwsers didn’t assist.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles