kaspa-consensus-core 0.15.0

Kaspa consensus core
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use thiserror::Error;

#[derive(Error, Debug, Clone)]
pub enum CoinbaseError {
    #[error("coinbase payload length is {0} while the minimum allowed length is {1}")]
    PayloadLenBelowMin(usize, usize),

    #[error("coinbase payload length is {0} while the maximum allowed length is {1}")]
    PayloadLenAboveMax(usize, usize),

    #[error("coinbase payload script public key length is {0} while the maximum allowed length is {1}")]
    PayloadScriptPublicKeyLenAboveMax(usize, u8),

    #[error("coinbase payload length is {0} bytes but it needs to be at least {1} bytes long in order to accommodate the script public key")]
    PayloadCantContainScriptPublicKey(usize, usize),
}

pub type CoinbaseResult<T> = std::result::Result<T, CoinbaseError>;