1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
use crate::Hash; //TODO should we impl Odr? #[derive(Copy, Clone, Debug, Eq, PartialEq)] pub struct Outpoint { txid: Hash, index: u32, } impl Outpoint { ///Returns a null Outpoint for use in coinbase transactions. pub fn null() -> Outpoint { Outpoint { txid: Default::default(), index: u32::max_value(), } } pub fn is_null(&self) -> bool { *self == Outpoint::null() } }