mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: expose PendingPayload from reth-basic-payload-builder (#7946)
This commit is contained in:
@ -581,13 +581,23 @@ where
|
||||
|
||||
/// A future that resolves to the result of the block building job.
|
||||
#[derive(Debug)]
|
||||
struct PendingPayload<P> {
|
||||
pub struct PendingPayload<P> {
|
||||
/// The marker to cancel the job on drop
|
||||
_cancel: Cancelled,
|
||||
/// The channel to send the result to.
|
||||
payload: oneshot::Receiver<Result<BuildOutcome<P>, PayloadBuilderError>>,
|
||||
}
|
||||
|
||||
impl<P> PendingPayload<P> {
|
||||
/// Constructs a `PendingPayload` future.
|
||||
pub fn new(
|
||||
cancel: Cancelled,
|
||||
payload: oneshot::Receiver<Result<BuildOutcome<P>, PayloadBuilderError>>,
|
||||
) -> Self {
|
||||
Self { _cancel: cancel, payload }
|
||||
}
|
||||
}
|
||||
|
||||
impl<P> Future for PendingPayload<P> {
|
||||
type Output = Result<BuildOutcome<P>, PayloadBuilderError>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user