Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

fix: compute pre/post token balances on all accounts if token program present #15900

Merged

Conversation

oJshua
Copy link
Contributor

@oJshua oJshua commented Mar 16, 2021

Problem

SPL Token balance changes from inner instructions are not included in {pre,post}TokenBalances.

Summary of Changes

Previously, account balance queries were performed only if token program was involved at the instruction level. This change queries all accounts when the token program is present in the transaction.

Fixes #15760

@oJshua oJshua requested a review from CriesofCarrots March 16, 2021 04:39
@codecov
Copy link

codecov bot commented Mar 16, 2021

Codecov Report

Merging #15900 (7832189) into master (60e5fd1) will increase coverage by 0.0%.
The diff coverage is 33.3%.

@@           Coverage Diff           @@
##           master   #15900   +/-   ##
=======================================
  Coverage    80.0%    80.0%           
=======================================
  Files         409      409           
  Lines      106417   106415    -2     
=======================================
+ Hits        85182    85198   +16     
+ Misses      21235    21217   -18     

Copy link
Contributor

@CriesofCarrots CriesofCarrots left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thx!

@oJshua oJshua added the automerge Merge this Pull Request automatically once CI passes label Mar 16, 2021
@mergify mergify bot merged commit 61112d4 into solana-labs:master Mar 16, 2021
mergify bot pushed a commit that referenced this pull request Mar 16, 2021
… present (#15900)

* fix: compute pre/post token balances on all accounts if token program present

* fix: skip token program in balance query

* fix: prevent program ids from being collected

(cherry picked from commit 61112d4)
mergify bot pushed a commit that referenced this pull request Mar 16, 2021
… present (#15900)

* fix: compute pre/post token balances on all accounts if token program present

* fix: skip token program in balance query

* fix: prevent program ids from being collected

(cherry picked from commit 61112d4)
mergify bot added a commit that referenced this pull request Mar 16, 2021
… present (#15900) (#15923)

* fix: compute pre/post token balances on all accounts if token program present

* fix: skip token program in balance query

* fix: prevent program ids from being collected

(cherry picked from commit 61112d4)

Co-authored-by: Josh <josh.hundley@gmail.com>
mergify bot added a commit that referenced this pull request Mar 16, 2021
… present (#15900) (#15922)

* fix: compute pre/post token balances on all accounts if token program present

* fix: skip token program in balance query

* fix: prevent program ids from being collected

(cherry picked from commit 61112d4)

Co-authored-by: Josh <josh.hundley@gmail.com>
@brooksprumo brooksprumo mentioned this pull request Aug 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
automerge Merge this Pull Request automatically once CI passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RPC: SPL Token balance changes from inner instructions are not included in {pre,post}TokenBalances
2 participants