Skip to content

Commit

Permalink
Merge pull request #766 from tonlabs/SIlkovAlexander/fix_debug_run_ba…
Browse files Browse the repository at this point in the history
…lance

Fixed debug run gas limit
  • Loading branch information
SilkovAlexander authored Jul 15, 2022
2 parents 9acb5d7 + b75ccb4 commit f971d69
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 33 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to this project will be documented in this file.

## Version: 0.27.6

### Bug fixes
- Fixed `debug run` gas limits


## Version: 0.27.1

### Breaking changes:
Expand Down
53 changes: 27 additions & 26 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ license = 'Apache-2.0'
name = 'tonos-cli'
readme = 'README.md'
repository = 'https://github.com/tonlabs/tonos-cli'
version = '0.27.6'
version = '0.27.7'

[dependencies]
async-trait = '0.1.42'
Expand Down
15 changes: 9 additions & 6 deletions src/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ async fn debug_call_command(matches: &ArgMatches<'_>, config: &Config, is_getter

let ton_client = create_client(&config)?; // TODO: create local for boc and tvc
let input = input.unwrap();
let account = if is_tvc {
let mut account = if is_tvc {
construct_account_from_tvc(input,
matches.value_of("ACCOUNT_ADDRESS"),
Some(u64::MAX))?
Expand Down Expand Up @@ -614,6 +614,9 @@ async fn debug_call_command(matches: &ArgMatches<'_>, config: &Config, is_getter
let message = Message::construct_from_base64(&message.message)
.map_err(|e| format!("Failed to construct message: {}", e))?;

if is_getter {
account.set_balance(CurrencyCollection::with_grams(u64::MAX));
}
let mut acc_root = account.serialize()
.map_err(|e| format!("Failed to serialize account: {}", e))?;

Expand Down Expand Up @@ -1019,13 +1022,13 @@ pub async fn execute_debug(
gas_price: 65536000,
flat_gas_limit: 100,
flat_gas_price: 1000000,
gas_limit: 1000000,
special_gas_limit: 10000000,
gas_credit: 10000000,
block_gas_limit: 10000000,
gas_limit: u64::MAX,
special_gas_limit: u64::MAX,
gas_credit: u64::MAX,
block_gas_limit: u64::MAX,
freeze_due_limit: 100000000,
delete_due_limit:1000000000,
max_gas_threshold:10000000000,
max_gas_threshold:u128::MAX,
};
let c20 = ConfigParamEnum::ConfigParam20(gas.clone());
let c21 = ConfigParamEnum::ConfigParam21(gas);
Expand Down

0 comments on commit f971d69

Please sign in to comment.