bug: Correct nonce validation (#409)

* feat: Correct nonce validation

* clenup

* Update crates/consensus/src/verification.rs

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
This commit is contained in:
rakita
2022-12-13 18:28:05 +01:00
committed by GitHub
parent 8e5e7ff5b6
commit 0fa7d5c29b
3 changed files with 145 additions and 63 deletions

View File

@ -788,20 +788,13 @@ impl TransactionSignedEcRecovered {
self.signer
}
/// Create [TransactionSignedEcRecovered] from [TransactionSigned] and author of transaction
pub fn from_signed_transactions_and_signer(
signed_transaction: TransactionSigned,
signer: Address,
) -> Self {
Self { signed_transaction, signer }
}
/// Transform back to [`TransactionSigned`]
pub fn into_signed(self) -> TransactionSigned {
self.signed_transaction
}
/// Create [`TransactionSignedEcRecovered`] from [`TransactionSigned`] and [`Address`].
/// Create [`TransactionSignedEcRecovered`] from [`TransactionSigned`] and [`Address`] of the
/// signer.
pub fn from_signed_transaction(signed_transaction: TransactionSigned, signer: Address) -> Self {
Self { signed_transaction, signer }
}