feat: make PayloadBuilderHandle pub (#5578)

This commit is contained in:
Stefan Batalka
2023-11-27 09:25:24 +00:00
committed by GitHub
parent 13af07c1fb
commit ca9f236947

View File

@ -78,7 +78,11 @@ pub struct PayloadBuilderHandle {
// === impl PayloadBuilderHandle ===
impl PayloadBuilderHandle {
pub(crate) fn new(to_service: mpsc::UnboundedSender<PayloadServiceCommand>) -> Self {
/// Creates a new payload builder handle for the given channel.
///
/// Note: this is only used internally by the [PayloadBuilderService] to manage the payload
/// building flow See [PayloadBuilderService::poll] for implementation details.
pub fn new(to_service: mpsc::UnboundedSender<PayloadServiceCommand>) -> Self {
Self { to_service }
}
@ -349,7 +353,7 @@ type PayloadFuture =
Pin<Box<dyn Future<Output = Result<Arc<BuiltPayload>, PayloadBuilderError>> + Send + Sync>>;
/// Message type for the [PayloadBuilderService].
pub(crate) enum PayloadServiceCommand {
pub enum PayloadServiceCommand {
/// Start building a new payload.
BuildNewPayload(
PayloadBuilderAttributes,