-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: check recent confirmed utxos to void missing pending xudt #180
feat: check recent confirmed utxos to void missing pending xudt #180
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
735ffb9
to
424f191
Compare
(utxo) => | ||
!utxo.status.confirmed || | ||
// include utxo that confirmed in 20 minutes to avoid missing pending xudt | ||
(utxo.status.block_time && Date.now() / 1000 - utxo.status.block_time < 20 * 60), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to identify RGBPP UTXOs with the pending jobs in the queue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's another way to accomplish this, but the transaction queue may contain many pending jobs. We need to retrieve transaction details using the pending jobs' txid to determine if the transaction belongs to the current address.
Also, the number of pending jobs might exceed the number of transactions that have occurred within the last 20 minutes by the current address.
The issue here is that we cannot obtain the pending amount between the BTC transaction being confirmed and the CKB transaction being confirmed. Therefore, I believe it is sufficient to obtain the confirmed BTC transactions 20 minutes before the current time would work and have minimal modification.
Get the confirmed txid within the last 20 minutes to avoid missing xUDT where the BTC transaction has been confirmed but the CKB transaction is still pending