Skip to content
Snippets Groups Projects
Commit e1afcac0 authored by ABDELGHANI Nassim's avatar ABDELGHANI Nassim Committed by ABDELGHANI Nassim
Browse files

use DB module

parent 6b7f205f
Branches
Tags
1 merge request!46Resolve "Validation locale"
......@@ -348,12 +348,9 @@ defmodule WS2P.Connection do
# TODO
%{"name" => "BLOCK", "block" => block} ->
:dets.open_file(:block, [{:file, 'data/block'}, {:type, :set}])
:dets.open_file(:global_bindex, [{:file, 'data/global_bindex'}, {:type, :set}])
existing_block =
:dets.lookup(:block, block["number"]) != [] and
:dets.lookup(:global_bindex, block["number"]) != []
DB.lookup('block', block["number"]) != [] and
DB.lookup('global_bindex', block["number"]) != []
if !existing_block do
case Block.Validation.Local.valid(block) do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment