@@ -44,7 +44,17 @@ pub type EvmNeedsNextBlock<'a, Ext, Db> = Trevm<'a, Ext, Db, NeedsNextBlock>;
44
44
/// [`Tx`]: crate::Tx
45
45
pub type EvmNeedsTx < ' a , Ext , Db , C > = Trevm < ' a , Ext , Db , NeedsTx < C > > ;
46
46
47
+ /// A [`Trevm`] that is ready to execute a transaction.
48
+ ///
49
+ /// The transaction may be executed with [`EvmReady::run`] or cleared
50
+ /// with [`EvmReady::clear_tx`]
51
+ pub type EvmReady < ' a , Ext , Db , C > = Trevm < ' a , Ext , Db , Ready < C > > ;
52
+
47
53
/// A [`Trevm`] that encountered an error during transaction execution.
54
+ ///
55
+ /// Expected continuations include:
56
+ /// - [`EvmTransacted::reject`]
57
+ /// - [`EvmTransacted::accept`]
48
58
pub type EvmTransacted < ' a , Ext , Db , C > = Trevm < ' a , Ext , Db , TransactedState < C > > ;
49
59
50
60
/// A [`Trevm`] that encountered an error during transaction execution.
@@ -55,12 +65,6 @@ pub type EvmTransacted<'a, Ext, Db, C> = Trevm<'a, Ext, Db, TransactedState<C>>;
55
65
pub type EvmErrored < ' a , Ext , Db , C , E = <C as BlockContext < Ext , Db > >:: Error > =
56
66
Trevm < ' a , Ext , Db , ErroredState < C , E > > ;
57
67
58
- /// A [`Trevm`] that is ready to execute a transaction.
59
- ///
60
- /// The transaction may be executed with [`EvmReady::run`] or cleared
61
- /// with [`EvmReady::clear_tx`]
62
- pub type EvmReady < ' a , Ext , Db , C > = Trevm < ' a , Ext , Db , Ready < C > > ;
63
-
64
68
#[ allow( dead_code) ]
65
69
#[ allow( unnameable_types) ]
66
70
pub ( crate ) mod sealed {
@@ -271,6 +275,21 @@ macro_rules! trevm_aliases {
271
275
/// The transaction may be executed with [`Trevm::execute_tx`] or
272
276
/// cleared with [`Trevm::clear_tx`]
273
277
pub type EvmReady <' a, C > = $crate:: EvmReady <' a, $ext, $db, C >;
278
+
279
+ /// A [`Trevm`] that encountered an error during transaction execution.
280
+ ///
281
+ /// Expected continuations include:
282
+ /// - [`EvmTransacted::reject`]
283
+ /// - [`EvmTransacted::accept`]
284
+ pub type EvmTransacted <' a, C > = $crate:: EvmTransacted <' a, $ext, $db, C >;
285
+
286
+ /// A [`Trevm`] that encountered an error during transaction execution.
287
+ ///
288
+ /// Expected continuations include:
289
+ /// - [`EvmErrored::discard_error`]
290
+ /// - [`EvmErrored::into_error`]
291
+ pub type EvmErrored <' a, C , E = <C as $crate:: BlockContext <$ext, $db>>:: Error > =
292
+ $crate:: EvmErrored <' a, $ext, $db, C , E >;
274
293
}
275
294
} ;
276
295
@@ -337,6 +356,21 @@ macro_rules! trevm_aliases {
337
356
/// The transaction may be executed with [`Trevm::execute_tx`] or
338
357
/// cleared with [`Trevm::clear_tx`]
339
358
pub type EvmReady <C > = $crate:: EvmReady <' static , $ext, $db, C >;
359
+
360
+ /// A [`Trevm`] that encountered an error during transaction execution.
361
+ ///
362
+ /// Expected continuations include:
363
+ /// - [`EvmTransacted::reject`]
364
+ /// - [`EvmTransacted::accept`]
365
+ pub type EvmTransacted <C > = $crate:: EvmTransacted <' static , $ext, $db, C >;
366
+
367
+ /// A [`Trevm`] that encountered an error during transaction execution.
368
+ ///
369
+ /// Expected continuations include:
370
+ /// - [`EvmErrored::discard_error`]
371
+ /// - [`EvmErrored::into_error`]
372
+ pub type EvmErrored <C , E = <C as $crate:: BlockContext <$ext, $db>>:: Error > =
373
+ $crate:: EvmErrored <' static , $ext, $db, C , E >;
340
374
}
341
375
} ;
342
376
}
0 commit comments