mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat(api,rpc): improve engine API abstraction (#6871)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
@ -15,8 +15,8 @@ use futures_util::FutureExt;
|
||||
use reth_interfaces::RethResult;
|
||||
use reth_node_api::{BuiltPayload, PayloadBuilderAttributes};
|
||||
use reth_payload_builder::{
|
||||
database::CachedReads, error::PayloadBuilderError, EthBuiltPayload, KeepPayloadJobAlive,
|
||||
PayloadId, PayloadJob, PayloadJobGenerator,
|
||||
database::CachedReads, error::PayloadBuilderError, KeepPayloadJobAlive, PayloadId, PayloadJob,
|
||||
PayloadJobGenerator,
|
||||
};
|
||||
use reth_primitives::{
|
||||
bytes::BytesMut,
|
||||
@ -890,7 +890,7 @@ where
|
||||
///
|
||||
/// This compares the total fees of the blocks, higher is better.
|
||||
#[inline(always)]
|
||||
pub fn is_better_payload(best_payload: Option<&EthBuiltPayload>, new_fees: U256) -> bool {
|
||||
pub fn is_better_payload(best_payload: Option<impl BuiltPayload>, new_fees: U256) -> bool {
|
||||
if let Some(best_payload) = best_payload {
|
||||
new_fees > best_payload.fees()
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user