Skip to content

Commit

Permalink
Updating: minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
gallettilance committed May 4, 2018
1 parent 2d7e3ed commit a49a42b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/cli.dats
Original file line number Diff line number Diff line change
Expand Up @@ -231,13 +231,15 @@ 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
| test => (chain_add(); reward(a); clear_transact())
| ~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

Expand Down
4 changes: 4 additions & 0 deletions src/query_ops.dats
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ extern
fun
get_queries(): queries

extern
fun
clear_queries(): void

(* ****** ****** *)

implement
Expand Down
2 changes: 1 addition & 1 deletion src/trans_ops.dats
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a49a42b

Please sign in to comment.