Skip to content

Commit 2c1383a

Browse files
committed
Reformatting.
1 parent 19e2710 commit 2c1383a

File tree

13 files changed

+38
-26
lines changed

13 files changed

+38
-26
lines changed

linera-chain/src/block_tracker.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,12 @@ impl<'resources, 'blobs> BlockExecutionTracker<'resources, 'blobs> {
171171
/// Returns a new TransactionTracker for the current transaction.
172172
fn new_transaction_tracker(&mut self) -> Result<TransactionTracker, ChainError> {
173173
// Convert operation results to Vec<Vec<u8>>
174-
let previous_operation_results = self.operation_results
174+
let previous_operation_results = self
175+
.operation_results
175176
.iter()
176177
.map(|result| result.0.clone())
177178
.collect();
178-
179+
179180
Ok(TransactionTracker::new(
180181
self.local_time,
181182
self.transaction_index,

linera-chain/src/unit_tests/chain_tests.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ use linera_execution::{
2626
committee::{Committee, ValidatorState},
2727
test_utils::{ExpectedCall, MockApplication},
2828
BaseRuntime, ContractRuntime, ExecutionError, ExecutionRuntimeConfig, ExecutionRuntimeContext,
29-
Operation, OperationInput, ResourceControlPolicy, ServiceRuntime, SystemOperation, TestExecutionRuntimeContext,
29+
Operation, OperationInput, ResourceControlPolicy, ServiceRuntime, SystemOperation,
30+
TestExecutionRuntimeContext,
3031
};
3132
use linera_views::{
3233
context::{Context as _, MemoryContext, ViewContext},

linera-core/src/unit_tests/wasm_worker_tests.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ use linera_chain::{
2828
};
2929
use linera_execution::{
3030
system::SystemOperation, test_utils::SystemExecutionState, ExecutionRuntimeContext, Operation,
31-
OperationInput, OperationContext, ResourceController, TransactionTracker, WasmContractModule, WasmRuntime,
31+
OperationContext, OperationInput, ResourceController, TransactionTracker, WasmContractModule,
32+
WasmRuntime,
3233
};
3334
use linera_storage::{DbStorage, Storage};
3435
#[cfg(feature = "dynamodb")]

linera-execution/src/evm/revm.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@ use crate::{
3838
database::{DatabaseRuntime, StorageStats, EVM_SERVICE_GAS_LIMIT},
3939
},
4040
BaseRuntime, ContractRuntime, ContractSyncRuntimeHandle, DataBlobHash, EvmExecutionError,
41-
EvmRuntime, ExecutionError, OperationInput, ServiceRuntime, ServiceSyncRuntimeHandle, UserContract,
42-
UserContractInstance, UserContractModule, UserService, UserServiceInstance, UserServiceModule,
41+
EvmRuntime, ExecutionError, OperationInput, ServiceRuntime, ServiceSyncRuntimeHandle,
42+
UserContract, UserContractInstance, UserContractModule, UserService, UserServiceInstance,
43+
UserServiceModule,
4344
};
4445

4546
/// This is the selector of the `execute_message` that should be called

linera-execution/src/execution.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ where
132132
next_chain_index,
133133
None,
134134
&[],
135-
vec![], // No previous operation results for testing
135+
vec![], // No previous operation results for testing
136136
);
137137
txn_tracker.add_created_blob(blob);
138138
self.run_user_action(
@@ -328,7 +328,7 @@ where
328328
previous_results.last().unwrap().clone()
329329
}
330330
};
331-
331+
332332
self.run_user_action(
333333
application_id,
334334
UserAction::Operation(context, bytes),

linera-execution/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@ pub enum OperationInput {
825825
Direct(
826826
#[serde(with = "serde_bytes")]
827827
#[debug(with = "hex_debug")]
828-
Vec<u8>
828+
Vec<u8>,
829829
),
830830
/// Composed input that uses the result from the previous operation in the block.
831831
/// If operation_results is empty, an error should be raised during execution.
@@ -1193,7 +1193,7 @@ impl Operation {
11931193
})
11941194
}
11951195

1196-
/// Creates a new composed user application operation that uses the result from the
1196+
/// Creates a new composed user application operation that uses the result from the
11971197
/// previous operation as input.
11981198
#[cfg(with_testing)]
11991199
pub fn user_composed(application_id: ApplicationId) -> Self {

linera-execution/src/runtime.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ use crate::{
3333
util::{ReceiverExt, UnboundedSenderExt},
3434
ApplicationDescription, ApplicationId, BaseRuntime, ContractRuntime, DataBlobHash,
3535
ExecutionError, FinalizeContext, Message, MessageContext, MessageKind, ModuleId, Operation,
36-
OperationInput, OutgoingMessage, QueryContext, QueryOutcome, ServiceRuntime, TransactionTracker,
37-
UserContractCode, UserContractInstance, UserServiceCode, UserServiceInstance,
38-
MAX_STREAM_NAME_LEN,
36+
OperationInput, OutgoingMessage, QueryContext, QueryOutcome, ServiceRuntime,
37+
TransactionTracker, UserContractCode, UserContractInstance, UserServiceCode,
38+
UserServiceInstance, MAX_STREAM_NAME_LEN,
3939
};
4040

4141
#[cfg(test)]

linera-execution/src/transaction_tracker.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,15 @@ impl TransactionTracker {
326326
/// Creates a new [`TransactionTracker`] for testing, with default values and the given
327327
/// oracle responses.
328328
pub fn new_replaying(oracle_responses: Vec<OracleResponse>) -> Self {
329-
TransactionTracker::new(Timestamp::from(0), 0, 0, 0, Some(oracle_responses), &[], vec![])
329+
TransactionTracker::new(
330+
Timestamp::from(0),
331+
0,
332+
0,
333+
0,
334+
Some(oracle_responses),
335+
&[],
336+
vec![],
337+
)
330338
}
331339

332340
/// Creates a new [`TransactionTracker`] for testing, with default values and oracle responses

linera-execution/src/wasm/runtime_api.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ use linera_witty::{wit_export, Instance, RuntimeError};
1717
use tracing::log;
1818

1919
use super::WasmExecutionError;
20-
use crate::{BaseRuntime, ContractRuntime, DataBlobHash, ExecutionError, ModuleId, OperationInput, ServiceRuntime};
20+
use crate::{
21+
BaseRuntime, ContractRuntime, DataBlobHash, ExecutionError, ModuleId, OperationInput,
22+
ServiceRuntime,
23+
};
2124

2225
/// Common host data used as the `UserData` of the system API implementations.
2326
pub struct RuntimeApiData<Runtime> {
@@ -690,7 +693,7 @@ where
690693
.schedule_operation(OperationInput::Direct(operation))
691694
.map_err(|error| RuntimeError::Custom(error.into()))
692695
}
693-
696+
694697
/// Schedules a composed operation to be included in the block being built by this query.
695698
fn schedule_composed_operation(caller: &mut Caller) -> Result<(), RuntimeError> {
696699
caller

linera-execution/tests/contract_runtime_apis.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ use linera_execution::{
2727
RegisterMockApplication, SystemExecutionState,
2828
},
2929
BaseRuntime, ContractRuntime, ExecutionError, Message, MessageContext, Operation,
30-
OperationContext, OperationInput, ResourceController, SystemExecutionStateView, TestExecutionRuntimeContext,
31-
TransactionOutcome, TransactionTracker,
30+
OperationContext, OperationInput, ResourceController, SystemExecutionStateView,
31+
TestExecutionRuntimeContext, TransactionOutcome, TransactionTracker,
3232
};
3333
use linera_views::context::MemoryContext;
3434
use test_case::{test_case, test_matrix};

0 commit comments

Comments
 (0)