question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Notes of expired transaction should be removed

See original GitHub issue

What happened?

Incorrect pending balance. When we create a new transaction, we use account.syncTransaction to update notes in db. However, for transactions that are not mined before expiration sequence, something unexpected happens.

Your balance is made of notes on the chain that are safe to spend
Balance: $IRON 0.79998400

0 notes worth 0.00000000 are on the chain within 12 blocks of the head
Unconfirmed: 0.79998400

1 notes worth 1.00000000 are waiting for miners to add them to the chain
Pending: 1.79998400

 Status     Creator Hash                                   Miner Fee Fee ($IRON)         Notes Spends Expiration Sequence
 ────────── ─────── ────────────────────────────────────── ───────── ─────────────────── ───── ────── ───────────────────
 confirmed  βœ”       9af35cbe06f45d58dea9720eb4366ddbc706d… x         0.00000800          2     1      227327
 confirmed  x       ea0d7631889ce0e934cd9bd2bba399931fe0a… x         0.00005000          2     1      227089
 expired    x       569c8aa82142768410c36ef585c12ba8641c0… x         0.00000500          2     1      227082
 unconfirmed βœ”       e6d1d70085f0b1afce89cbf19e0e491a08fe… x         0.00000800          2     1      227356

 Amount ($IRON) Memo       From Transaction                                                 Spent
 ────────────── ────────── ──────────────────────────────────────────────────────────────── ─────
 1.00000000     test 9246cccd66674f2b60740e36a499debdc825f3d3e0ffe040054791db0dd3941a x (from expired transaction)
 0.79998400          b59b1daa28943bfef19b75a3203bd6a89183c37778984d9dafb2eea1c051dfb4 x
 0.89999200          204640b16924cf0c1349a74c1f4caf81d9f62939e4f07908c2478db32d90242c βœ”
 1.00000000     test2 4fa27b50544ed0caf63894d40869ec678bf64cba2ebcda3ebee7942fb93420b0 βœ”

Version

0.1.49 @ src

Debug output

No response

Relevant log output

No response

Graffiti

miningKing

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
hughycommented, Oct 18, 2022

Status of notes already spent is first marked as spent when I create a transaction to spend it, then it changes and rolls back to unspent.

That’s very helpful, thanks for all of the details in the comments here!

0reactions
hughycommented, Nov 3, 2022

Resolved in #2399

Read more comments on GitHub >

github_iconTop Results From Across the Web

Β§ 1026.23 Right of rescission. | Consumer Financial Protection ...
If the required notice or material disclosures are not delivered, the right to rescind shall expire 3 years after consummation, upon transfer of...
Read more >
Delete or void a customer's credit note - Xero Central
If a credit note was deleted or voided in error, copy the credit note to create a new one for your customer.
Read more >
What Is a Void Transaction and Where, When & How Does It ...
A void transaction is a transaction that is canceled by a merchant or vendor before it settles through a consumer's account.
Read more >
Opening and Viewing a Transaction List Record
To delete a record, check the box to the left of the record, and then click on the ... Note: If a critical...
Read more >
Transaction Status Report | Square Support Center - US
Charge or Cancel Uncompleted Transactions ... If a transaction is uncompleted and falls within 30 days of the initial authorization date, you may...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found