mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
refactor: change PayloadConfig to use parent header instead of parent block (#12159)
This commit is contained in:
@ -8,7 +8,7 @@ use reth::{
|
||||
use reth_basic_payload_builder::{BasicPayloadJobGeneratorConfig, PayloadBuilder, PayloadConfig};
|
||||
use reth_node_api::PayloadBuilderAttributes;
|
||||
use reth_payload_builder::{PayloadBuilderError, PayloadJobGenerator};
|
||||
use reth_primitives::BlockNumberOrTag;
|
||||
use reth_primitives::{BlockNumberOrTag, SealedHeader};
|
||||
use std::sync::Arc;
|
||||
|
||||
/// The generator type that creates new jobs that builds empty blocks.
|
||||
@ -77,7 +77,10 @@ where
|
||||
// we already know the hash, so we can seal it
|
||||
block.seal(attributes.parent())
|
||||
};
|
||||
let config = PayloadConfig::new(Arc::new(parent_block), Bytes::default(), attributes);
|
||||
let hash = parent_block.hash();
|
||||
let header = SealedHeader::new(parent_block.header().clone(), hash);
|
||||
|
||||
let config = PayloadConfig::new(Arc::new(header), Bytes::default(), attributes);
|
||||
Ok(EmptyBlockPayloadJob {
|
||||
client: self.client.clone(),
|
||||
_pool: self.pool.clone(),
|
||||
|
||||
Reference in New Issue
Block a user