tonutils-go
tonutils-go copied to clipboard
transaction was not confirmed in a given deadline, but it may still be confirmed later
Hi! Hope you are doing well. I have a big problem with
transaction was not confirmed in a given deadline, but it may still be confirmed later
Do you think increasing the scanning number from 5 to maybe 10 can fix this problem? I am sending transactions with a normal sleep time like 15s or sometimes 20s. But still sometimes I get this error. It's really make the system unreliable because sometimes it does not send the transactions, and sometimes it sends.
https://github.com/xssnick/tonutils-go/blob/642950da31f12a34c998a5a5803b522ec1dd2f2c/ton/sendmessagewait.go#L78
Do you have any idea?
Hi, externals may lost during broadcasting between liteserver and nodes sometimes, increasing limit will not help i think, you better to wait for timeout and message timeout (specified in wallet) and retry in this case.
The problem is I got "transaction was not confirmed in a given deadline, but it may still be confirmed later", for both successful transactions and failed transaction and I have no idea how I can fix it. I set more than 20s sleep between each transaction but still I got this error. Sometimes too much.
the only way that I found to solve that was something like:
_, _, err = sender.SendWaitTransaction(ctx, &wallet.Message{ Mode: wallet.PayGasSeparately, InternalMessage: &tlb.InternalMessage{ Bounce: false, DstAddr: address.MustParseAddr(recAddr), Amount: tlb.MustFromTON(amountStr), }, }) if err != nil { if strings.Contains(err.Error(), "transaction was not confirmed") { // start a gorutine that checks if the tx is success. }
you can use the method listTransactions and check the time and the last txs in the receiver, I know that is not the best way but you can resend the transaction if you dont find it after 1 hour.
Won't work for me as I send transactions the to same address (imagine DstAddr is always XYZ), so there's no unique factor that I can check that the specific transaction to XYZ address is received or not.
Won't work for me as I send transactions the to same address (imagine DstAddr is always XYZ), so there's no unique factor that I can check that the specific transaction to XYZ address is received or not.
Can you use unique comment for each transaction so you can use it as a unique factor?
Won't work for me as I send transactions the to same address (imagine DstAddr is always XYZ), so there's no unique factor that I can check that the specific transaction to XYZ address is received or not.
Can you use unique comment for each transaction so you can use it as a unique factor?
Not in my case, putting a good number for sleep between each transaction can make sure the previous transaction's broadcasted successfully.