essential_builder_types/
lib.rs

1use essential_types::ContentAddress;
2use serde::{Deserialize, Serialize};
3
4/// A failed attempt at applying a solution set at a particular location within a particular block.
5///
6/// The builder stores these in order to provide solution set submitters feedback in the case that a
7/// solution set could not be applied trivially and did not make it into a block.
8#[derive(Clone, Debug, Eq, Hash, PartialEq, PartialOrd, Ord, Deserialize, Serialize)]
9pub struct SolutionSetFailure<'a> {
10    /// The number of the block in which the builder attempted to apply the solution set.
11    pub attempt_block_num: i64,
12    /// The address of the block in which the builder attempted to apply the solution set.
13    pub attempt_block_addr: ContentAddress,
14    /// The solution set index within the block at which the builder attempted to apply the solution set.
15    pub attempt_solution_set_ix: u32,
16    /// An error message describing why the builder failed to apply the solution set.
17    pub err_msg: std::borrow::Cow<'a, str>,
18}