Bitcoin
Invalid data structure when creating segwit transaction
I’m trying to sign a Segwit Bitcoin transaction, but I’m getting an error and would like to know if there’s a problem with my data structure. "Code: -26, Error: non-mandatory-script-verify-flag (Signature must be zero for failed CHECK(MULTI)SIG operation)"
.
The previous deal was this.
Here’s the deal before signing:
01000000
01
14fe532eec4ddc9bfd8686a7234300c24a47c60e437ae26e966a43e47f947def
00000000
16
00140429fc6e543ff7b4b75d0c6a60013c125827aa66
ffffffff
02
c409000000000000
16
00140429fc6e543ff7b4b75d0c6a60013c125827aa66
c409000000000000
16
00145951ac8720b1865ba633d19eaa6473afae7c46b3
00000000
01000000
Here’s the deal after signing:
01000000
0001
01
14fe532eec4ddc9bfd8686a7234300c24a47c60e437ae26e966a43e47f947def
00000000
00
ffffffff
02
c409000000000000
16
00140429fc6e543ff7b4b75d0c6a60013c125827aa66
c409000000000000
16
00145951ac8720b1865ba633d19eaa6473afae7c46b3
02
493045022100fc5ea4b7f61cf65b016a0cbeb1d1a7ffc6e24a5b8d6b581372f27e85d515b6e80220204350062193f069f7e67b3244751b8ebf25798b24af1e6ff6f0bdc609d08e1ae601210280a1bfa268074c9171ed0e30f332706789c5138e1428e92506e671b1997eb874
00000000
What’s wrong with my data structure?