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

Fix AssetDescriptor #882

Merged
merged 8 commits into from
Jul 3, 2019
Merged

Conversation

shargon
Copy link
Member

@shargon shargon commented Jul 2, 2019

Close #881

@shargon shargon requested a review from erikzhang July 2, 2019 07:43
@vncoelho
Copy link
Member

vncoelho commented Jul 2, 2019

Master, Shargon, fast as a bolt.

@codecov-io
Copy link

codecov-io commented Jul 2, 2019

Codecov Report

Merging #882 into master will increase coverage by 0.21%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #882      +/-   ##
==========================================
+ Coverage   44.72%   44.93%   +0.21%     
==========================================
  Files         177      177              
  Lines       12577    12577              
==========================================
+ Hits         5625     5652      +27     
+ Misses       6952     6925      -27
Impacted Files Coverage Δ
neo/Wallets/AssetDescriptor.cs 82.35% <100%> (+82.35%) ⬆️
neo/VM/Helper.cs 32.9% <0%> (+5.16%) ⬆️
neo/SmartContract/ApplicationEngine.cs 87.5% <0%> (+5.68%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0dc5fa0...9978d63. Read the comment docs.

@@ -19,7 +19,7 @@ public AssetDescriptor(UInt160 asset_id)
sb.EmitAppCall(asset_id, "name");
script = sb.ToArray();
}
ApplicationEngine engine = ApplicationEngine.Run(script);
ApplicationEngine engine = ApplicationEngine.Run(script, extraGAS: 10_000_000);
Copy link
Contributor

Choose a reason for hiding this comment

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

what's this value?

Copy link
Member Author

@shargon shargon Jul 3, 2019

Choose a reason for hiding this comment

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

We can adjust it to a better one

Copy link
Contributor

Choose a reason for hiding this comment

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

This seems arbitrary. Would setting test mode be a better approach?

Copy link
Member

Choose a reason for hiding this comment

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

name() may contain an infinite loop, and testMode can cause the client to fail to jump out of an infinite loop.

@shargon shargon merged commit 950b5ff into neo-project:master Jul 3, 2019
@shargon shargon deleted the fix-asset-descriptor branch July 3, 2019 10:36
Tommo-L pushed a commit to Tommo-L/neo that referenced this pull request Jun 22, 2020
* Fix

* Better with fixed gas

* Remove testnet

* Fix


Better with fixed gas


Remove testnet

* UT Asset Description

* Reduce limit
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

Successfully merging this pull request may close these issues.

AssetDescriptor constructor throwing ArgumentException
6 participants