diff --git a/applications/tari_dan_app_utilities/src/template_manager/implementation/manager.rs b/applications/tari_dan_app_utilities/src/template_manager/implementation/manager.rs index 50b7b7387..5846158c5 100644 --- a/applications/tari_dan_app_utilities/src/template_manager/implementation/manager.rs +++ b/applications/tari_dan_app_utilities/src/template_manager/implementation/manager.rs @@ -20,9 +20,15 @@ // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE // USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -use std::{collections::HashMap, convert::TryFrom, fs, sync::Arc}; +use std::{ + collections::HashMap, + convert::TryFrom, + fs, + sync::Arc, + time::{SystemTime, UNIX_EPOCH}, +}; -use chrono::Utc; +use chrono::{Duration, Utc}; use log::*; use tari_common_types::types::{FixedHash, PublicKey}; use tari_crypto::tari_utilities::ByteArray; @@ -48,7 +54,6 @@ use tari_template_builtin::{ FAUCET_TEMPLATE_ADDRESS, }; use tari_template_lib::{models::TemplateAddress, Hash}; -use tokio::sync::broadcast; use super::TemplateConfig; use crate::template_manager::{ @@ -60,6 +65,12 @@ const LOG_TARGET: &str = "tari::validator_node::template_manager"; const CONCURRENT_ACCESS_LIMIT: isize = 100; +#[derive(Debug, Clone)] +pub enum TemplateResult { + Template(Box