#[non_exhaustive]pub struct MiningRounds {
pub open: Vec<ContractWithState>,
pub issuing: Vec<ContractWithState>,
}Expand description
The mining rounds that rewards can be registered in, and the ones whose rewards are being computed.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.open: Vec<ContractWithState>OpenMiningRound contracts. Several are open at once, and the newest
may not have reached its opening time.
issuing: Vec<ContractWithState>IssuingMiningRound contracts.
Implementations§
Source§impl MiningRounds
impl MiningRounds
Sourcepub fn latest_open(&self, now: Timestamp) -> Result<&ContractWithState>
pub fn latest_open(&self, now: Timestamp) -> Result<&ContractWithState>
The open round to pass to a choice at now: of the rounds whose
opening time has come, the one with the highest number.
This is the round Splice’s own applications pick
(selectLatestOpenMiningRound). The round with the lowest number is
open too, but it is the next to be archived, and a transaction built
on it fails if the archival lands first.
§Errors
Error::UnexpectedResponse if a round’s payload has no round or
opensAt, and Error::Connection, which is retriable, if no round
has opened yet.
Trait Implementations§
Source§impl Clone for MiningRounds
impl Clone for MiningRounds
Auto Trait Implementations§
impl Forget for MiningRounds
impl Freeze for MiningRounds
impl Move for MiningRounds
impl RefUnwindSafe for MiningRounds
impl Send for MiningRounds
impl Sync for MiningRounds
impl Unpin for MiningRounds
impl UnsafeUnpin for MiningRounds
impl UnwindSafe for MiningRounds
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request