Skip to content

goal: Change asset commands to use AccountAssetInformation#4758

Merged
michaeldiamant merged 7 commits into
algorand:masterfrom
algochoi:assetinfo-reserve
Nov 7, 2022
Merged

goal: Change asset commands to use AccountAssetInformation#4758
michaeldiamant merged 7 commits into
algorand:masterfrom
algochoi:assetinfo-reserve

Conversation

@algochoi
Copy link
Copy Markdown
Contributor

@algochoi algochoi commented Nov 4, 2022

Summary

This PR addresses some open comments made in #4684

Addresses three things:

  • Change EncodedBlockCert decoding to use Decode instead of DecodeReflect
  • Use AccountAssetInformation API in goal asset info. This changes behavior in goal asset info that looked like a bug regarding reserve addresses: the command now returns an error if a reserve asset is not opted into the asset, whereas previously, the command returned zero-ed values without failing. One test was changed to reflect this behavior.
  • Refactor libgoal to use AccountAssetInformation instead of AccountInformationV2

Test Plan

CI tests.

@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 4, 2022

Codecov Report

Merging #4758 (e2930a1) into master (0eae1c0) will decrease coverage by 0.37%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #4758      +/-   ##
==========================================
- Coverage   54.56%   54.19%   -0.38%     
==========================================
  Files         414      414              
  Lines       53666    53646      -20     
==========================================
- Hits        29283    29073     -210     
- Misses      21955    22115     +160     
- Partials     2428     2458      +30     
Impacted Files Coverage Δ
cmd/goal/asset.go 15.75% <0.00%> (+0.20%) ⬆️
libgoal/libgoal.go 2.53% <0.00%> (ø)
libgoal/transactions.go 0.00% <0.00%> (ø)
netdeploy/remote/bootstrappedNetwork.go 0.00% <0.00%> (-71.43%) ⬇️
cmd/algocfg/getCommand.go 12.00% <0.00%> (-16.00%) ⬇️
crypto/merklearray/proof.go 79.41% <0.00%> (-14.71%) ⬇️
ledger/onlinetopheap.go 86.66% <0.00%> (-13.34%) ⬇️
ledger/apply/payment.go 6.52% <0.00%> (-13.05%) ⬇️
protocol/codec.go 53.68% <0.00%> (-10.53%) ⬇️
data/basics/overflow.go 43.05% <0.00%> (-9.73%) ⬇️
... and 43 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@algochoi algochoi requested a review from jasonpaulos November 7, 2022 15:25
@algochoi algochoi marked this pull request as ready for review November 7, 2022 15:25
Copy link
Copy Markdown
Contributor

@jasonpaulos jasonpaulos left a comment

Choose a reason for hiding this comment

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

Thanks for taking the time to make these improvements.

I left a suggestion for some additional code simplification, but consider it optional.

Comment thread libgoal/transactions.go Outdated
jasonpaulos
jasonpaulos previously approved these changes Nov 7, 2022
Comment thread test/scripts/e2e_subs/asset-misc.sh
@michaeldiamant
Copy link
Copy Markdown
Contributor

Merging - I reviewed the backward incompatible API change and agree with categorizing it as a bug fix.

@michaeldiamant michaeldiamant merged commit 76ff3a8 into algorand:master Nov 7, 2022
@algochoi algochoi deleted the assetinfo-reserve branch November 7, 2022 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants