I use `listunspent` `createrawtransaction` `signrawtransaction` to do a transaction ,but got 'error code: -26 , error message:64: no-witness-yet'
Here is my history in testnet :
My core version is 0.16
1、
bitcoin-cli listunspent 1
[
{
"txid": "6afb6f83f034a1d66d9a6ea4cd801cc5b745df3965f86d3f04fd670b3a26b60d",
"vout": 0,
"address": "2N2uvmFF4sPvySr8vp9gUdZ5eWLGwU7Hp9i",
"account": "watch-only test",
"scriptPubKey": "a9146a0af9dd8aca62845621586f42bc1805aeb5fe3087",
"amount": 0.50000000,
"confirmations": 1,
"spendable": false,
"solvable": false,
"safe": true
},
{
"txid": "1cb8c4ad8e01812df83a371d1654823b610c695e6149c7e0dee9cbf702e020d7",
"vout": 0,
"address": "2N8cLkMQnarJTFxPWvYJRFbTWxSxajg7Ke6",
"account": "watch-only test2",
"scriptPubKey": "a914a88843c7122018efb263fba9ad89a2fe3147eccd87",
"amount": 0.10000000,
"confirmations": 9,
"spendable": false,
"solvable": false,
"safe": true
}
]
2、
bitcoin-cli createrawtransaction '[{ "txid" : "6afb6f83f034a1d66d9a6ea4cd801cc5b745df3965f86d3f04fd670b3a26b60d", "vout" : 0 },{ "txid" : "1cb8c4ad8e01812df83a371d1654823b610c695e6149c7e0dee9cbf702e020d7", "vout" : 0 }]' '{"2N8cLkMQnarJTFxPWvYJRFbTWxSxajg7Ke6": 0.4, "mjru3uKfSqwR1WMiEtWmez9BYkWALY1XRp": 0.19998392}'
02000000020db6263a0b67fd043f6df86539df45b7c51c80cda46e9a6dd6a134f0836ffb6a00000
00000ffffffffd720e002f7cbe9dee0c749615e690c613b8254161d373af82d81018eadc4b81c00
00000000ffffffff02005a62020000000017a914a88843c7122018efb263fba9ad89a2fe3147ecc
d87b8263101000000001976a9142fa61d4b373af86c243c4b277b992b942d82106088ac00000000
3、
(on another bitcoin core with all the private keys)bitcoin-cli signrawtransaction 02000000020db6263a0b67fd043f6df86539df45b7c51c80cda46e9a6dd6a134f0836ffb6a00000
00000ffffffffd720e002f7cbe9dee0c749615e690c613b8254161d373af82d81018eadc4b81c00
00000000ffffffff02005a62020000000017a914a88843c7122018efb263fba9ad89a2fe3147ecc
d87b8263101000000001976a9142fa61d4b373af86c243c4b277b992b942d82106088ac00000000
'[{"txid":"6afb6f83f034a1d66d9a6ea4cd801cc5b745df3965f86d3f04fd670b3a26b60d","vout":0,"scriptPubKey":"a9146a0af9dd8aca62845621586f42bc1805aeb5fe3087"},{"txid":"1cb8c4ad8e01812df83a371d1654823b610c695e6149c7e0dee9cbf702e020d7","vout":0,"scriptPubKey":"a914a88843c7122018efb263fba9ad89a2fe3147eccd87"}]'
{
"hex": "020000000001020db6263a0b67fd043f6df86539df45b7c51c80cda46e9a6dd6a134f0836ffb6a0
0000000171600146e15e112bbf11e1ffaed36fbf26110fb16ee6346ffffffffd720e002f7cbe9de
e0c749615e690c613b8254161d373af82d81018eadc4b81c00000000171600144d6e83016b034ac
01500ab463c4050a876097b84ffffffff02005a62020000000017a914a88843c7122018efb263fb
a9ad89a2fe3147eccd87b8263101000000001976a9142fa61d4b373af86c243c4b277b992b942d8
2106088ac0247304402207a9ef6e9624187179e103cc675abbb562b1a0a11c468b7a0d256df4f02
c193cb02207851969ddff1b207cf26ac7693f48e812f7c03e80d96e820ed1468b8a2d6cd8d01210
3dd732bc9b11c27e3bdbc068489514c8a311dd900a3ae852d8a07b6c14e1d509b0247304402203c
287b6b1a8f0fd4e997ff36963c37a24fdb940c4240417fa551510738615bc30220623cae9715959
3c55fab9c655dc02dfcb85af6c1e7a1e14e14805ea1d921770d0121028a8c638a6730ebe0ab5157
70b46ef6d675db72c8154aeb6b81212dc20594de0400000000",
"complete": true
}
4、
bitcoin-cli sendrawtransaction 020000000001020db6263a0b67fd043f6df86539df45b7c51c80cda46e9a6dd6a134f0836ffb6a0
0000000171600146e15e112bbf11e1ffaed36fbf26110fb16ee6346ffffffffd720e002f7cbe9de
e0c749615e690c613b8254161d373af82d81018eadc4b81c00000000171600144d6e83016b034ac
01500ab463c4050a876097b84ffffffff02005a62020000000017a914a88843c7122018efb263fb
a9ad89a2fe3147eccd87b8263101000000001976a9142fa61d4b373af86c243c4b277b992b942d8
2106088ac0247304402207a9ef6e9624187179e103cc675abbb562b1a0a11c468b7a0d256df4f02
c193cb02207851969ddff1b207cf26ac7693f48e812f7c03e80d96e820ed1468b8a2d6cd8d01210
3dd732bc9b11c27e3bdbc068489514c8a311dd900a3ae852d8a07b6c14e1d509b0247304402203c
287b6b1a8f0fd4e997ff36963c37a24fdb940c4240417fa551510738615bc30220623cae9715959
3c55fab9c655dc02dfcb85af6c1e7a1e14e14805ea1d921770d0121028a8c638a6730ebe0ab5157
70b46ef6d675db72c8154aeb6b81212dc20594de0400000000
error code: -26
error message:
64: no-witness-yet
-----------------
My bitcoin core with all the private keys state:
bitcoin-cli getblockchaininfo
{
"chain": "test",
"blocks": 600616,
"headers": 1293072,
"bestblockhash": "00000000000119b2bf788e27f76e5d0e62dffce262abf1d13773afa76b823e78",
"difficulty": 28603.69332409825,
"mediantime": 1447192838,
"verificationprogress": 0.3545194889064706,
"initialblockdownload": true,
"chainwork": "0000000000000000000000000000000000000000000000067b7f487511f533d2",
"size_on_disk": 12105222551,
"pruned": false,
"softforks": [
{
"id": "bip34",
"version": 2,
"reject": {
"status": true
}
},
{
"id": "bip66",
"version": 3,
"reject": {
"status": true
}
},
{
"id": "bip65",
"version": 4,
"reject": {
"status": true
}
}
],
"bip9_softforks": {
"csv": {
"status": "defined",
"startTime": 1456790400,
"timeout": 1493596800,
"since": 0
},
"segwit": {
"status": "defined",
"startTime": 1462060800,
"timeout": 1493596800,
"since": 0
}
},
"warnings": ""
}
-------------
Any one can help me?