Title: Using Createrawtransaction Got no-witness-yet Error Post by: haoqian on May 03, 2018, 02:32:40 PM Hi, I am trying to use createrawtransaction.
When I use following code: Code: op_return_data="4d79206e616d65" It will get : Code: error code: -26 I do not know why. How to solve it? Could you help me? Thanks! Title: Re: Using Createrawtransaction Got no-witness-yet Error Post by: achow101 on May 03, 2018, 03:08:43 PM This error means that you are trying to spend from or create segwit outputs without segwit being activated yet. Is your node fully synced?
Title: Re: Using Createrawtransaction Got no-witness-yet Error Post by: achow101 on May 03, 2018, 03:24:12 PM I did not include any Segwit in any transaction. why does it show here? Are you sure? If you forked from the latest Bitcoin Core, it uses segwit by default. Can you post what the changeaddress looks like and what the output of listunspent looks like?Title: Re: Using Createrawtransaction Got no-witness-yet Error Post by: haoqian on May 03, 2018, 03:29:30 PM I did not include any Segwit in any transaction. why does it show here? Are you sure? If you forked from the latest Bitcoin Core, it uses segwit by default. Can you post what the changeaddress looks like and what the output of listunspent looks like?Thank you for your reply. I forked 0.16 bitcoin core. getrawchangeaddress shows this: Code: 3PgBJaR5fCw9nBtij7THqfHbbENdCdFEuv listunspent shows this: Code: { Title: Re: Using Createrawtransaction Got no-witness-yet Error Post by: achow101 on May 03, 2018, 03:35:16 PM Can you also post what your final signed transaction looks like?
getrawchangeaddress shows this: This will be a problem for you later because that is a segwit address and you do not have segwit enabled.Code: 3PgBJaR5fCw9nBtij7THqfHbbENdCdFEuv Title: Re: Using Createrawtransaction Got no-witness-yet Error Post by: haoqian on May 03, 2018, 03:40:21 PM Can you also post what your final signed transaction looks like? getrawchangeaddress shows this: This will be a problem for you later because that is a segwit address and you do not have segwit enabled.Code: 3PgBJaR5fCw9nBtij7THqfHbbENdCdFEuv Thank you for your reply. It looks like this: Code: { Title: Re: Using Createrawtransaction Got no-witness-yet Error Post by: achow101 on May 03, 2018, 04:22:52 PM Code: "txid": "551ba4bde3460bca6a6cae7da57ffd8b3f1baf18ad7a2e6d50f8d4f5b0a94e14", Title: Re: Using Createrawtransaction Got no-witness-yet Error Post by: haoqian on May 03, 2018, 04:27:06 PM Code: "txid": "551ba4bde3460bca6a6cae7da57ffd8b3f1baf18ad7a2e6d50f8d4f5b0a94e14", Thank you very much for your reply. How can I spend money using createrawtransaction? I am not familiar with Segwit... Title: Re: Using Createrawtransaction Got no-witness-yet Error Post by: achow101 on May 03, 2018, 08:49:13 PM How can I spend money using createrawtransaction? I am not familiar with Segwit... createrawtransaction is unrelated to this or to segwit. The problem is that the wallet assumes segwit is enabled by default, but segwit is not enabled according to your network rules. So you either have to enable segwit in the network rules, or change the wallet to assume segwit is disabled. How you do that you will need to figure out yourself.Title: Re: Using Createrawtransaction Got no-witness-yet Error Post by: haoqian on May 04, 2018, 02:46:53 PM How can I spend money using createrawtransaction? I am not familiar with Segwit... createrawtransaction is unrelated to this or to segwit. The problem is that the wallet assumes segwit is enabled by default, but segwit is not enabled according to your network rules. So you either have to enable segwit in the network rules, or change the wallet to assume segwit is disabled. How you do that you will need to figure out yourself.Thank you. You gave me a helpful info. |