Closed mikiw closed 1 month ago
Transferring from https://github.com/0xSpaceShard/starknet-devnet-rs/issues/484:
Refactoring will probably have to deal with this problem of redundant state committing:
In handle_accepted_transaction, we call commit_with_diff and optionally generate_new_block_and_state: https://github.com/0xSpaceShard/starknet-devnet-rs/blob/3ad81456092a2da939be1f590855cea2c18ce40c/crates/starknet-devnet-core/src/starknet/mod.rs#L457-L480
handle_accepted_transaction
commit_with_diff
generate_new_block_and_state
In generate_new_block_and_state we call commit_with_diff again: https://github.com/0xSpaceShard/starknet-devnet-rs/blob/3ad81456092a2da939be1f590855cea2c18ce40c/crates/starknet-devnet-core/src/starknet/mod.rs#L335
Transferring from https://github.com/0xSpaceShard/starknet-devnet-rs/issues/484:
Refactoring will probably have to deal with this problem of redundant state committing:
In
handle_accepted_transaction
, we callcommit_with_diff
and optionallygenerate_new_block_and_state
: https://github.com/0xSpaceShard/starknet-devnet-rs/blob/3ad81456092a2da939be1f590855cea2c18ce40c/crates/starknet-devnet-core/src/starknet/mod.rs#L457-L480In
generate_new_block_and_state
we callcommit_with_diff
again: https://github.com/0xSpaceShard/starknet-devnet-rs/blob/3ad81456092a2da939be1f590855cea2c18ce40c/crates/starknet-devnet-core/src/starknet/mod.rs#L335