Add gmminer_pow_cuckoo:set_edge_bits/2
This commit is contained in:
parent
8c5e9b9f26
commit
88db4e6098
@ -34,6 +34,8 @@
|
|||||||
get_target/2
|
get_target/2
|
||||||
]).
|
]).
|
||||||
|
|
||||||
|
-export([ set_edge_bits/2 ]).
|
||||||
|
|
||||||
-export_type([hashable/0,
|
-export_type([hashable/0,
|
||||||
hash/0,
|
hash/0,
|
||||||
exec/0,
|
exec/0,
|
||||||
@ -159,6 +161,11 @@ hex_enc_header(#config{hex_enc_header = HexEncHdr}) ->
|
|||||||
hash_data(Data) ->
|
hash_data(Data) ->
|
||||||
gmminer_blake2b_256:hash(Data).
|
gmminer_blake2b_256:hash(Data).
|
||||||
|
|
||||||
|
-spec set_edge_bits(edge_bits(), config()) -> config().
|
||||||
|
set_edge_bits(Bits, Config)
|
||||||
|
when is_integer(Bits), Bits > 0, is_record(Config, config) ->
|
||||||
|
Config#config{edge_bits = Bits}.
|
||||||
|
|
||||||
%%------------------------------------------------------------------------------
|
%%------------------------------------------------------------------------------
|
||||||
%% Proof of Work generation with default settings
|
%% Proof of Work generation with default settings
|
||||||
%%
|
%%
|
||||||
|
Loading…
x
Reference in New Issue
Block a user