Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transaction was not confirmed in a given deadline, but it may still be confirmed later #291

Open
iw4p opened this issue Jan 17, 2025 · 4 comments

Comments

@iw4p
Copy link
Contributor

iw4p commented Jan 17, 2025

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.

txList, err := c.WaitForBlock(block.SeqNo).ListTransactions(ctx, ext.DstAddr, 5, lastLt, lastHash)

Do you have any idea?

@xssnick
Copy link
Owner

xssnick commented Jan 20, 2025

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.

@iw4p
Copy link
Contributor Author

iw4p commented Jan 20, 2025

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.

@Kevinbarrero
Copy link

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.

@iw4p
Copy link
Contributor Author

iw4p commented Jan 24, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@xssnick @iw4p @Kevinbarrero and others