@@ -3,7 +3,7 @@ use alloy_eips::eip2718::Encodable2718;
3
3
use reth_node_api:: EngineTypes ;
4
4
use reth_node_core:: {
5
5
primitives:: B256 ,
6
- rpc:: types:: { BlockTransactions , ExecutionPayloadV2 , ExecutionPayloadV3 , RichBlock } ,
6
+ rpc:: types:: { Block , BlockTransactions , ExecutionPayloadV2 , ExecutionPayloadV3 } ,
7
7
} ;
8
8
use reth_rpc_builder:: auth:: AuthServerHandle ;
9
9
use reth_rpc_types:: ExecutionPayloadV1 ;
@@ -19,10 +19,10 @@ pub trait BlockProvider: Send + Sync + 'static {
19
19
/// Runs a block provider to send new blocks to the given sender.
20
20
///
21
21
/// Note: This is expected to be spawned in a separate task.
22
- fn subscribe_blocks ( & self , tx : mpsc:: Sender < RichBlock > ) -> impl Future < Output = ( ) > + Send ;
22
+ fn subscribe_blocks ( & self , tx : mpsc:: Sender < Block > ) -> impl Future < Output = ( ) > + Send ;
23
23
24
24
/// Get a past block by number.
25
- fn get_block ( & self , block_number : u64 ) -> impl Future < Output = eyre:: Result < RichBlock > > + Send ;
25
+ fn get_block ( & self , block_number : u64 ) -> impl Future < Output = eyre:: Result < Block > > + Send ;
26
26
27
27
/// Get previous block hash using previous block hash buffer. If it isn't available (buffer
28
28
/// started more recently than `offset`), fetch it using `get_block`.
@@ -78,7 +78,7 @@ impl<P: BlockProvider + Clone> DebugConsensusClient<P> {
78
78
let mut previous_block_hashes = AllocRingBuffer :: new ( 64 ) ;
79
79
80
80
let mut block_stream = {
81
- let ( tx, rx) = mpsc:: channel :: < RichBlock > ( 64 ) ;
81
+ let ( tx, rx) = mpsc:: channel :: < Block > ( 64 ) ;
82
82
let block_provider = self . block_provider . clone ( ) ;
83
83
tokio:: spawn ( async move {
84
84
block_provider. subscribe_blocks ( tx) . await ;
@@ -87,7 +87,7 @@ impl<P: BlockProvider + Clone> DebugConsensusClient<P> {
87
87
} ;
88
88
89
89
while let Some ( block) = block_stream. recv ( ) . await {
90
- let payload = rich_block_to_execution_payload_v3 ( block) ;
90
+ let payload = block_to_execution_payload_v3 ( block) ;
91
91
92
92
let block_hash = payload. block_hash ( ) ;
93
93
let block_number = payload. block_number ( ) ;
@@ -170,9 +170,9 @@ impl ExecutionNewPayload {
170
170
}
171
171
}
172
172
173
- /// Convert a rich block from RPC / Etherscan to params for an execution client's "new payload"
173
+ /// Convert a block from RPC / Etherscan to params for an execution client's "new payload"
174
174
/// method. Assumes that the block contains full transactions.
175
- pub fn rich_block_to_execution_payload_v3 ( block : RichBlock ) -> ExecutionNewPayload {
175
+ pub fn block_to_execution_payload_v3 ( block : Block ) -> ExecutionNewPayload {
176
176
let transactions = match & block. transactions {
177
177
BlockTransactions :: Full ( txs) => txs. clone ( ) ,
178
178
// Empty array gets deserialized as BlockTransactions::Hashes.
0 commit comments