Neo: Why does ApplicationEngine.Run default to test mode?

Created on 19 Aug 2020  路  6Comments  路  Source: neo-project/neo

Prior to #1819, ApplicationEngine.Run testMode parameter defaulted to false. Now, the gas parameter defaults to TestModeGas.

Wouldn't it make more sense to default gas parameter to zero? Or remove the default entirely?

question

All 6 comments

Or remove the default entirely?

Agree.

Yes, I think that we can remove the default value.

Because in most cases we use test mode.

I think we should use wallet balance instead of testmodegas, as in common sense the one who tests executing script locally will send corresponding transaction. Furthermore, a 20 gas testmodegas might not be enough for some cases.

I think we should use wallet balance instead of testmodegas, as in common sense the one who tests executing script locally will send corresponding transaction. Furthermore, a 20 gas testmodegas might not be enough for some cases.

But this means you'll always return fault if you don't open your wallet when execution. It doesn't make sense. Virtual resource cost should not be the same value of actual wallet balance. If like that, you always need open wallet and have enough gas.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

doubiliu picture doubiliu  路  3Comments

vncoelho picture vncoelho  路  3Comments

roman-khimov picture roman-khimov  路  3Comments

igormcoelho picture igormcoelho  路  4Comments

shargon picture shargon  路  4Comments