|
@@ -257,9 +257,10 @@ impl Borrow<CryptoHash> for SignedTransaction {
|
257
|
257
|
}
|
258
|
258
|
|
259
|
259
|
/// The status of execution for a transaction or a receipt.
|
260
|
|
-#[derive(BorshSerialize, BorshDeserialize, PartialEq, Eq, Clone)]
|
|
260
|
+#[derive(Default, BorshSerialize, BorshDeserialize, PartialEq, Eq, Clone)]
|
261
|
261
|
pub enum ExecutionStatus {
|
262
|
262
|
/// The execution is pending or unknown.
|
|
263
|
+ #[default]
|
263
|
264
|
Unknown,
|
264
|
265
|
/// The execution has failed with the given execution error.
|
265
|
266
|
Failure(Box<TxExecutionError>),
|
|
@@ -285,12 +286,6 @@ impl fmt::Debug for ExecutionStatus {
|
285
|
286
|
}
|
286
|
287
|
}
|
287
|
288
|
|
288
|
|
-impl Default for ExecutionStatus {
|
289
|
|
- fn default() -> Self {
|
290
|
|
- ExecutionStatus::Unknown
|
291
|
|
- }
|
292
|
|
-}
|
293
|
|
-
|
294
|
289
|
/// ExecutionOutcome for proof. Excludes logs and metadata
|
295
|
290
|
#[derive(BorshSerialize, BorshDeserialize, PartialEq, Eq, Clone)]
|
296
|
291
|
pub struct PartialExecutionOutcome {
|
|
@@ -371,21 +366,16 @@ impl Default for ExecutionOutcome {
|
371
|
366
|
}
|
372
|
367
|
}
|
373
|
368
|
|
374
|
|
-#[derive(BorshSerialize, BorshDeserialize, PartialEq, Clone, Eq, Debug)]
|
|
369
|
+#[derive(Default, BorshSerialize, BorshDeserialize, PartialEq, Clone, Eq, Debug)]
|
375
|
370
|
pub enum ExecutionMetadata {
|
376
|
371
|
// V1: Empty Metadata
|
|
372
|
+ #[default]
|
377
|
373
|
V1,
|
378
|
374
|
|
379
|
375
|
// V2: With ProfileData
|
380
|
376
|
V2(ProfileData),
|
381
|
377
|
}
|
382
|
378
|
|
383
|
|
-impl Default for ExecutionMetadata {
|
384
|
|
- fn default() -> Self {
|
385
|
|
- ExecutionMetadata::V1
|
386
|
|
- }
|
387
|
|
-}
|
388
|
|
-
|
389
|
379
|
impl fmt::Debug for ExecutionOutcome {
|
390
|
380
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
391
|
381
|
f.debug_struct("ExecutionOutcome")
|