Skip to content

Commit

Permalink
Fix unit test + add dummy gas costs
Browse files Browse the repository at this point in the history
  • Loading branch information
sydhds committed Dec 12, 2023
1 parent 39ce52d commit fe29505
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 23 deletions.
25 changes: 4 additions & 21 deletions massa-execution-worker/src/tests/scenarios_mandatories.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ use massa_ledger_exports::{
LedgerEntryUpdate, MockLedgerControllerWrapper, SetOrKeep, SetUpdateOrDelete,
};
use massa_models::bytecode::Bytecode;
use massa_models::config::{ENDORSEMENT_COUNT, LEDGER_ENTRY_DATASTORE_BASE_SIZE, THREAD_COUNT};
use massa_models::config::{
CHAINID, ENDORSEMENT_COUNT, LEDGER_ENTRY_DATASTORE_BASE_SIZE, THREAD_COUNT,
};
use massa_models::test_exports::gen_endorsements_for_denunciation;
use massa_models::{address::Address, amount::Amount, slot::Slot};
use massa_models::{
Expand Down Expand Up @@ -2467,24 +2469,5 @@ fn chain_id() {
.get_filtered_sc_output_event(EventFilter::default());
// match the events
assert_eq!(events.len(), 1);
println!("event 0 data: {}", events[0].data.as_str());

/*
assert!(
events[0].data.ends_with("true"),
"Expected 'true': {:?}",
events[0].data
);
*/

// assert!(
// events[0].data.ends_with("true"),
// "Expected 'true': {:?}",
// events[0].data
// );
// assert!(
// events[1].data.ends_with("false"),
// "Expected 'false': {:?}",
// events[1].data
// );
assert_eq!(events[0].data, format!("Chain id: {}", *CHAINID));
}
4 changes: 2 additions & 2 deletions massa-node/base_config/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
# whether to enable gRPC
enabled = true
# whether to add HTTP 1 layer
accept_http1 = true
accept_http1 = false
# whether to enable CORS. works only if `accept_http1` is true
enable_cors = false
# whether to enable gRPC health service
Expand Down Expand Up @@ -116,7 +116,7 @@
# whether to enable gRPC
enabled = true
# whether to add HTTP 1 layer
accept_http1 = true
accept_http1 = false
# whether to enable CORS. works only if `accept_http1` is true
enable_cors = false
# whether to enable gRPC health service
Expand Down
2 changes: 2 additions & 0 deletions massa-node/base_config/gas_costs/abi_gas_costs.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"assembly_script_transfer_coins_for": 238,
"assembly_script_unsafe_random": 158,
"assembly_script_validate_address": 178,
"assembly_script_chain_id": 157,
"launch": 15702,
"abi_abort": 0,
"abi_add_native_amount": 483,
Expand Down Expand Up @@ -123,5 +124,6 @@
"abi_transfer_coins": 450,
"abi_unsafe_random": 402,
"abi_verify_signature": 1192,
"abi_chain_id": 301,
"launch_wasmv1": 18641
}

0 comments on commit fe29505

Please sign in to comment.