diff --git a/src/cli.dats b/src/cli.dats index 44cc150..c945dad 100644 --- a/src/cli.dats +++ b/src/cli.dats @@ -231,6 +231,7 @@ case+ args of val test_miner = is_miner(a) val test_transact = list0_length(list0_filter(get_data(), lam(t) => is_valid_transact(t))) > 0 val test_code = list0_length(get_result()) > 0 + val test_query = list0_length(get_queries()) > 0 val test = test_miner andalso test_transact andalso test_code in ifcase @@ -238,6 +239,7 @@ in | ~test_miner => (println!("unrecognized miner - please define miner first"); ()) | ~test_transact => (println!("must have at least one valid transaction per block"); ()) | ~test_code => (println!("must have at least one smart contract per block"); ()) + | ~test_query => (println!("must have at least one query per block"); ()) | _ => (println!("True = False?"); ()) end diff --git a/src/query_ops.dats b/src/query_ops.dats index 5bc44c2..3419d42 100644 --- a/src/query_ops.dats +++ b/src/query_ops.dats @@ -16,6 +16,10 @@ extern fun get_queries(): queries +extern +fun +clear_queries(): void + (* ****** ****** *) implement diff --git a/src/trans_ops.dats b/src/trans_ops.dats index 12b1bc7..4ccd96b 100644 --- a/src/trans_ops.dats +++ b/src/trans_ops.dats @@ -64,7 +64,7 @@ end implement -clear_transact() = (remove_file("./transaction.txt"); remove_file("./value.txt")) +clear_transact() = (remove_file("./transaction.txt"); remove_file("./value.txt"); remove_file("./queries.txt")) implement