Closed Shantaramm closed 1 year ago
Could you check in the logs, too see if there are any specific provider errors? Are you using the latest version? And are you sure the fees is sufficient and the outputs unspent?
Could you check in the logs, too see if there are any specific provider errors? Are you using the latest version? And are you sure the fees is sufficient and the outputs unspent?
And what should be done to check if the transaction was spent? I used the send_to() method, where I did not choose which transaction to take from utxo. How to make send_to not take spent transactions? (issue 274)
And one more question, when I send a transaction using the send / send_to method, from the wallet, how can I specify the change address? :)
With a Wallet object you can just use the scan(), utxos_update() method to get the unspent outputs. If you create a Transaction object yourself you use the Service.getutxos() like in the example above. It could be that there is some problem with the service providers or a mismatch of keys/utxos. If you could send me the complete code and outputs in the logs I can take a look into it.
The Wallet.send() method pick the next available unused change_address from the wallet. However if you specify a complete output_arr and fee which adds up as the same amounts of the total of the inputs, then no change output is generated. So you specify the change output yourself.
I figured out the first one, it was my mistake, I sent transactions with a small commission, so utxo were involved, but not spent, since the transaction was not confirmed. Thank you!
Regarding the second question, should I just specify the second output as: [(addr, amount), (addr_change, amount_imput-amount-fee)]?
P.s And I also wanted to say that litecoin_testnet service providers do not behave correctly, or maybe I'm doing something wrong, there are no such problems with other networks.
Regarding the second question, should I just specify the second output as: [(addr, amount), (addr_change, amount_imput-amount-fee)]?
Yes correct
At the moment only bitaps and chain.so offer a litecoin_testnet api, and both providers do not have fee estimation data. So unfortunately the only workaround would be to install a litecoin testnet node locally.
Okay, thanks for the replies!
And I also wanted to ask) When I do srv.getutxo(addr), the director sometimes returns outdated information or an empty array to me, can this only happen in the testnet or is it also possible in the normal litecoin / bitcoin network?
Even when I make a transaction in testnet for 50000 Sat, it goes through (I have fee=10000 by default), if the amount I send is 200000, then the transaction does not go through, fee = 10000. Is 10,000 a small commission? How can I look for a specific transaction error if I use Transaction()?
Thank you for your time!!!
That fee should be sufficient. The getutxos() method depends on external service providers, if they return incorrect or incomplete results, the method does as well. Please check the logs and let me know which provider causes this issue, to see if it fixable.
Okay thanks! Can you tell me how I can check the logs?
You can find the logs in ./bitcoinlib/bitoinlib.log in your user directory
I insert output_n, such as it is necessary, I indicate all the necessary information. The transaction does not go through, what did I do wrong?