Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: expose encoded_len_with_signature() #1063

Merged
merged 2 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/consensus/src/transaction/eip1559.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ impl TxEip1559 {
///
/// If `with_header` is `true`, the payload length will include the RLP header length.
/// If `with_header` is `false`, the payload length will not include the RLP header length.
pub(crate) fn encoded_len_with_signature(
pub fn encoded_len_with_signature(
&self,
signature: &Signature,
with_header: bool,
Expand Down
2 changes: 1 addition & 1 deletion crates/consensus/src/transaction/eip2930.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ impl TxEip2930 {
///
/// If `with_header` is `true`, the payload length will include the RLP header length.
/// If `with_header` is `false`, the payload length will not include the RLP header length.
pub(crate) fn encoded_len_with_signature(
pub fn encoded_len_with_signature(
&self,
signature: &Signature,
with_header: bool,
Expand Down
2 changes: 1 addition & 1 deletion crates/consensus/src/transaction/eip4844.rs
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ impl TxEip4844 {
///
/// If `with_header` is `true`, the payload length will include the RLP header length.
/// If `with_header` is `false`, the payload length will not include the RLP header length.
pub(crate) fn encoded_len_with_signature(
pub fn encoded_len_with_signature(
&self,
signature: &Signature,
with_header: bool,
Expand Down
2 changes: 1 addition & 1 deletion crates/consensus/src/transaction/eip7702.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ impl TxEip7702 {
///
/// If `with_header` is `true`, the payload length will include the RLP header length.
/// If `with_header` is `false`, the payload length will not include the RLP header length.
pub(crate) fn encoded_len_with_signature(
pub fn encoded_len_with_signature(
&self,
signature: &Signature,
with_header: bool,
Expand Down
2 changes: 1 addition & 1 deletion crates/consensus/src/transaction/legacy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ impl TxLegacy {

/// Returns what the encoded length should be, if the transaction were RLP encoded with the
/// given signature.
pub(crate) fn encoded_len_with_signature(&self, signature: &Signature) -> usize {
pub fn encoded_len_with_signature(&self, signature: &Signature) -> usize {
let payload_length = self.fields_len() + signature.rlp_vrs_len();
Header { list: true, payload_length }.length() + payload_length
}
Expand Down
Loading