pub enum DaoError {
InvalidHeader,
InvalidOutPoint,
InvalidDaoFormat,
Overflow,
ZeroC,
}
Expand description
Errors due to the fact that the NervosDAO rules are not respected.
Variants§
InvalidHeader
This error occurs during calculating the dao field for a block, which broadly indicates that it cannot find a required block.
InvalidOutPoint
When withdraws from NervosDAO, it requires the deposited header and withdrawing header to help calculating interest. This error occurs at withdrawing phase 2 for the below cases:
- The
HeaderDeps
does not include the withdrawing block hash. The withdrawing block hash indicates the block which packages the target transaction at withdrawing phase 1. - The
HeaderDeps
does not include the deposited block hash. The deposited block hash indicates the block which packages the target transaction at deposit phase. Please see withdrawing phase 2 for more details.
InvalidDaoFormat
When withdraws from NervosDAO, the deposited header should be specified via witness. This error indicates the corresponding witness is unexpected. See the code for more detail.
See also:
Overflow
Calculation overflow
ZeroC
ZeroC
Trait Implementations§
Source§impl Error for DaoError
impl Error for DaoError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<Error> for DaoError
impl From<Error> for DaoError
Source§fn from(error: CapacityError) -> Self
fn from(error: CapacityError) -> Self
Converts to this type from the input type.
impl Eq for DaoError
impl StructuralPartialEq for DaoError
Auto Trait Implementations§
impl Freeze for DaoError
impl RefUnwindSafe for DaoError
impl Send for DaoError
impl Sync for DaoError
impl Unpin for DaoError
impl UnwindSafe for DaoError
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)