Commit 41c9282
feat(l1): omit copying bytes when encoding transactions (#5137)
**Motivation**
When encoding non-legacy transactions we need to encode the payload
(txType || rlp(Transaction) as a bytes object. In order to do so we copy
the payload to a `Bytes` object and then encode it in rlp, this is not
needed as we can just encode the payload as bytes by invoking the
implementation for [u8] directly
**Description**
* Avoid using `Bytes::copy_from_slice` when encoding transactions
<!-- A clear and concise general description of the changes this PR
introduces -->
<!-- Link to issues: Resolves #111, Resolves #222 -->1 parent 4fc2d6b commit 41c9282
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
395 | 395 | | |
396 | 396 | | |
397 | 397 | | |
398 | | - | |
| 398 | + | |
399 | 399 | | |
400 | 400 | | |
401 | 401 | | |
| |||
0 commit comments