use std::collections::{HashMap, HashSet};
use chia_consensus::flags::MEMPOOL_MODE;
use chia_consensus::spendbundle_validation::get_flags_for_height_and_constants;
use chia_protocol::Bytes32;
use chia_sdk_coinset::CoinRecord;
use dig_constants::NetworkConstants;
pub struct ValidationContext {
pub height: u32,
pub timestamp: u64,
pub constants: NetworkConstants,
pub coin_records: HashMap<Bytes32, CoinRecord>,
pub ephemeral_coins: HashSet<Bytes32>,
}
impl ValidationContext {
pub fn spend_flags(&self, extra: u32) -> u32 {
get_flags_for_height_and_constants(self.height, self.constants.consensus())
| extra
| MEMPOOL_MODE
}
}