File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed
crates/anvil/core/src/eth Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -32,9 +32,7 @@ impl Block {
3232 T : Into < Transaction > ,
3333 {
3434 let transactions: Vec < _ > = transactions. into_iter ( ) . map ( Into :: into) . collect ( ) ;
35- let transactions1: Vec < super :: transaction:: TypedTransaction > =
36- transactions. clone ( ) . into_iter ( ) . map ( Into :: into) . collect ( ) ;
37- let transactions_root = calculate_transaction_root ( & transactions1) ;
35+ let transactions_root = calculate_transaction_root ( & transactions) ;
3836
3937 Self {
4038 header : Header {
Original file line number Diff line number Diff line change @@ -206,6 +206,12 @@ pub struct MaybeImpersonatedTransaction {
206206 pub impersonated_sender : Option < Address > ,
207207}
208208
209+ impl Typed2718 for MaybeImpersonatedTransaction {
210+ fn ty ( & self ) -> u8 {
211+ self . transaction . ty ( )
212+ }
213+ }
214+
209215impl MaybeImpersonatedTransaction {
210216 /// Creates a new wrapper for the given transaction
211217 pub fn new ( transaction : TypedTransaction ) -> Self {
@@ -279,6 +285,16 @@ impl MaybeImpersonatedTransaction {
279285 }
280286}
281287
288+ impl Encodable2718 for MaybeImpersonatedTransaction {
289+ fn encode_2718_len ( & self ) -> usize {
290+ self . transaction . encode_2718_len ( )
291+ }
292+
293+ fn encode_2718 ( & self , out : & mut dyn BufMut ) {
294+ self . transaction . encode_2718 ( out)
295+ }
296+ }
297+
282298impl Encodable for MaybeImpersonatedTransaction {
283299 fn encode ( & self , out : & mut dyn bytes:: BufMut ) {
284300 self . transaction . encode ( out)
You can’t perform that action at this time.
0 commit comments