-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Break down ConsensusParameters * Remove ConsensusParameters from everywhere * Use default for individual fields not for types * Get tests compiling, but not passing * Fix one test * Fix bug in transactor default * Fix bug in test helper * Fix fee test bug * Include chain_id in tx builder to get chain_id to match * Get all tests passing * Partially appease Clippy-sama * Group params for into_checked * Create param for Interpreter init * Simplify MemoryClient signature * Appease Clippy-sama * Move ConsensusParams back to original file * Use ConsensusParams in more places * Bump version, only use default `ChainId` * Make ConsensusParams hold values instead of refs * Consolidate ChainId and GasCosts into ConsensusParams * Collect Interpreter parameters inside struct * Fix tests * Cleanup, appease Clippy-sama * Simplify test setups * Remove comment and TODO * Rename `ConsensusParams` back to `ConsensusParameters` --------- Co-authored-by: Green Baneling <XgreenX9999@gmail.com>
- Loading branch information
1 parent
20f1e9b
commit e278038
Showing
66 changed files
with
1,876 additions
and
1,104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,7 @@ Cargo.lock | |
**/*.rs.bk | ||
|
||
.vscode/ | ||
|
||
.idea | ||
|
||
.history |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,45 @@ | ||
use fuel_tx::ConsensusParameters; | ||
use fuel_tx::{ | ||
ConsensusParameters, | ||
ContractParameters, | ||
FeeParameters, | ||
PredicateParameters, | ||
ScriptParameters, | ||
TxParameters, | ||
}; | ||
|
||
use fuel_types::ChainId; | ||
|
||
// override default settings to reduce testing overhead | ||
pub const PARAMS: ConsensusParameters = ConsensusParameters::DEFAULT | ||
.with_max_storage_slots(1024) | ||
pub const CONTRACT_PARAMS: ContractParameters = | ||
ContractParameters::DEFAULT.with_max_storage_slots(1024); | ||
|
||
pub const SCRIPT_PARAMS: ScriptParameters = ScriptParameters::DEFAULT | ||
.with_max_script_length(1024) | ||
.with_max_script_data_length(1024) | ||
.with_max_script_data_length(1024); | ||
|
||
pub const TX_PARAMS: TxParameters = TxParameters::DEFAULT | ||
.with_max_inputs(16) | ||
.with_max_outputs(16) | ||
.with_max_witnesses(16); | ||
|
||
pub const PREDICATE_PARAMS: PredicateParameters = PredicateParameters::DEFAULT; | ||
|
||
pub const FEE_PARAMS: FeeParameters = FeeParameters::DEFAULT; | ||
|
||
pub const CHAIN_ID: ChainId = ChainId::new(0); | ||
|
||
pub fn test_params() -> ConsensusParameters { | ||
ConsensusParameters::new( | ||
TX_PARAMS, | ||
PREDICATE_PARAMS, | ||
SCRIPT_PARAMS, | ||
CONTRACT_PARAMS, | ||
FEE_PARAMS, | ||
CHAIN_ID, | ||
Default::default(), | ||
) | ||
} | ||
|
||
mod input; | ||
mod output; | ||
mod transaction; |
Oops, something went wrong.