@@ -66,9 +66,9 @@ defmodule LambdaEthereumConsensus.Store.KvSchema do
6666
6767 with { :ok , it } <- Db . iterate_keys ( ) ,
6868 { :ok , encoded_start } <- do_encode_key ( start_key ) ,
69- { :ok , ^ encoded_start } <- Exleveldb . iterator_move ( it , encoded_start ) do
69+ { :ok , ^ encoded_start } <- Db . iterator_move ( it , encoded_start ) do
7070 res = iterate ( it , starting_value , f , direction , encoded_start , include_first? )
71- Exleveldb . iterator_close ( it )
71+ Db . iterator_close ( it )
7272 { :ok , res }
7373 else
7474 # The iterator moved for the first time to a place where it wasn't expected.
@@ -109,7 +109,7 @@ defmodule LambdaEthereumConsensus.Store.KvSchema do
109109 def first_key ( ) do
110110 { :ok , it } = Db . iterate_keys ( )
111111
112- case Exleveldb . iterator_move ( it , @ prefix ) do
112+ case Db . iterator_move ( it , @ prefix ) do
113113 { :ok , @ prefix <> _k = full_key } -> do_decode_key ( full_key )
114114 { :ok , _other } -> :not_found
115115 { :error , :invalid_iterator } -> :not_found
@@ -135,7 +135,7 @@ defmodule LambdaEthereumConsensus.Store.KvSchema do
135135 defp key_iterator ( key ) do
136136 with { :ok , it } <- Db . iterate_keys ( ) ,
137137 { :ok , encoded_start } <- do_encode_key ( key ) ,
138- { :ok , ^ encoded_start } <- Exleveldb . iterator_move ( it , encoded_start ) do
138+ { :ok , ^ encoded_start } <- Db . iterator_move ( it , encoded_start ) do
139139 { :first , it , key }
140140 else
141141 # The iterator moved for the first time to a place where it wasn't expected.
@@ -154,7 +154,7 @@ defmodule LambdaEthereumConsensus.Store.KvSchema do
154154 defp next_key ( { :first , it , key } , direction ) , do: { [ key ] , { :next , it } }
155155
156156 defp move_iterator ( it , direction ) do
157- case Exleveldb . iterator_move ( it , direction ) do
157+ case Db . iterator_move ( it , direction ) do
158158 { :ok , @ prefix <> _ = k } ->
159159 { :ok , decoded_key } = do_decode_key ( k )
160160 { [ decoded_key ] , { :next , it } }
@@ -168,7 +168,7 @@ defmodule LambdaEthereumConsensus.Store.KvSchema do
168168 defp next_key ( { :error , _ } , _direction ) , do: nil
169169
170170 defp close ( nil ) , do: :ok
171- defp close ( it ) , do: :ok == Exleveldb . iterator_close ( it )
171+ defp close ( it ) , do: :ok == Db . iterator_close ( it )
172172
173173 defp iterate ( it , acc , f , direction , _first_key , false ) do
174174 iterate ( it , acc , f , direction )
@@ -189,7 +189,7 @@ defmodule LambdaEthereumConsensus.Store.KvSchema do
189189 end
190190
191191 defp accumulate ( it , acc , f , direction ) do
192- case Exleveldb . iterator_move ( it , direction ) do
192+ case Db . iterator_move ( it , direction ) do
193193 { :ok , @ prefix <> _ = k } ->
194194 { :ok , decoded_key } = do_decode_key ( k )
195195 { :cont , f . ( decoded_key , acc ) }
0 commit comments