Skip to content

Commit

Permalink
Avoid ProtocolConfig clone in TemporaryStore (MystenLabs#15350)
Browse files Browse the repository at this point in the history
  • Loading branch information
aschran authored Dec 13, 2023
1 parent 50d8066 commit d4a6464
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sui-execution/latest/sui-adapter/src/temporary_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub struct TemporaryStore<'backing> {
execution_results: ExecutionResultsV2,
/// Objects that were loaded during execution (dynamic fields + received objects).
loaded_runtime_objects: BTreeMap<ObjectID, DynamicallyLoadedObjectMetadata>,
protocol_config: ProtocolConfig,
protocol_config: &'backing ProtocolConfig,

/// Every package that was loaded from DB store during execution.
/// These packages were not previously loaded into the temporary store.
Expand All @@ -67,7 +67,7 @@ impl<'backing> TemporaryStore<'backing> {
input_objects: InputObjects,
receiving_objects: Vec<ObjectRef>,
tx_digest: TransactionDigest,
protocol_config: &ProtocolConfig,
protocol_config: &'backing ProtocolConfig,
) -> Self {
let mutable_input_refs = input_objects.mutable_inputs();
let lamport_timestamp = input_objects.lamport_timestamp(&receiving_objects);
Expand All @@ -79,7 +79,7 @@ impl<'backing> TemporaryStore<'backing> {
lamport_timestamp,
mutable_input_refs,
execution_results: ExecutionResultsV2::default(),
protocol_config: protocol_config.clone(),
protocol_config,
loaded_runtime_objects: BTreeMap::new(),
runtime_packages_loaded_from_db: RwLock::new(BTreeMap::new()),
receiving_objects,
Expand Down

0 comments on commit d4a6464

Please sign in to comment.