Conversation
| } | ||
| else | ||
| { | ||
| engine.InvocationCounter[contract.ScriptHash] = 1; |
There was a problem hiding this comment.
Shargon, could this Dictionary be already initialized in 1 and avoid this if?
There was a problem hiding this comment.
we need to increment the value, so you need to query the previous value
There was a problem hiding this comment.
Yes, but I mean, for the first time initialize already with 1 and then just increment.
There was a problem hiding this comment.
It's initialized to 1 when it is not found
|
Is not related, is according to this issue #307 |
|
@erikzhang could you compute the gas cost? |
Codecov Report
@@ Coverage Diff @@
## master #813 +/- ##
=========================================
+ Coverage 38% 38.41% +0.4%
=========================================
Files 176 176
Lines 12443 12459 +16
=========================================
+ Hits 4729 4786 +57
+ Misses 7714 7673 -41
Continue to review full report at Codecov.
|
Co-Authored-By: Erik Zhang <erik@neo.org>
Co-Authored-By: Erik Zhang <erik@neo.org>
* GetInvocationCounter * UT as sample * Fix travis * Update neo/SmartContract/InteropService.cs * Update neo/SmartContract/ApplicationEngine.cs Co-Authored-By: Erik Zhang <erik@neo.org> * Update neo/SmartContract/InteropService.cs Co-Authored-By: Erik Zhang <erik@neo.org> * We need Writable dictionary * internal
Close #307