mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-09 19:51:47 +00:00
Remove use of ethers core (#5301)
* Remove use of ethers_core::RlpStream
* Merge branch 'unstable' of https://github.com/sigp/lighthouse into remove_use_of_ethers_core
* Remove old code
* Simplify keccak call
* Remove unused package
* Merge branch 'unstable' of https://github.com/ethDreamer/lighthouse into remove_use_of_ethers_core
* Merge branch 'unstable' into remove_use_of_ethers_core
* Run clippy
* Merge branch 'remove_use_of_ethers_core' of https://github.com/dospore/lighthouse into remove_use_of_ethers_core
* Check all cargo fmt
* Merge branch 'unstable' of https://github.com/sigp/lighthouse into remove_use_of_ethers_core
* Revert lock
* Merge branch 'unstable' of https://github.com/sigp/lighthouse into remove_use_of_ethers_core
* introduce a shim to convert between the two u256 types
* move alloy to wrokspace
* align alloy versions
* update
* update web3signer test certs
* Revert "update web3signer test certs"
This reverts commit effd5910ad.
* Consolidate alloy versions
* Delete empty file
This commit is contained in:
@@ -42,22 +42,17 @@ pub fn extract_versioned_hashes_from_transactions<E: EthSpec>(
|
||||
let mut versioned_hashes = Vec::new();
|
||||
|
||||
for tx in transactions {
|
||||
match beacon_tx_to_tx_envelope(tx)? {
|
||||
TxEnvelope::Eip4844(signed_tx_eip4844) => {
|
||||
versioned_hashes.extend(
|
||||
signed_tx_eip4844
|
||||
.tx()
|
||||
.blob_versioned_hashes
|
||||
.iter()
|
||||
.map(|fb| Hash256::from(fb.0)),
|
||||
);
|
||||
}
|
||||
// enumerating all variants explicitly to make pattern irrefutable
|
||||
// in case new types are added in the future which also have blobs
|
||||
TxEnvelope::Legacy(_)
|
||||
| TxEnvelope::TaggedLegacy(_)
|
||||
| TxEnvelope::Eip2930(_)
|
||||
| TxEnvelope::Eip1559(_) => {}
|
||||
// TxEnvelope is non-exhaustive so unforunately we can (no longer) write an exhaustive
|
||||
// match here.
|
||||
if let TxEnvelope::Eip4844(signed_tx_eip4844) = beacon_tx_to_tx_envelope(tx)? {
|
||||
versioned_hashes.extend(
|
||||
signed_tx_eip4844
|
||||
.tx()
|
||||
.tx()
|
||||
.blob_versioned_hashes
|
||||
.iter()
|
||||
.map(|fb| Hash256::from(fb.0)),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,7 +71,8 @@ pub fn beacon_tx_to_tx_envelope<N: Unsigned>(
|
||||
mod test {
|
||||
use super::*;
|
||||
use crate::test_utils::static_valid_tx;
|
||||
use alloy_consensus::{TxKind, TxLegacy};
|
||||
use alloy_consensus::TxLegacy;
|
||||
use alloy_primitives::TxKind;
|
||||
|
||||
type E = types::MainnetEthSpec;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user