Add gmminer_pow_cuckoo:set_edge_bits/2

This commit is contained in:
Ulf Wiger 2025-03-16 17:37:39 +01:00
parent 8c5e9b9f26
commit 88db4e6098

View File

@ -34,6 +34,8 @@
get_target/2
]).
-export([ set_edge_bits/2 ]).
-export_type([hashable/0,
hash/0,
exec/0,
@ -159,6 +161,11 @@ hex_enc_header(#config{hex_enc_header = HexEncHdr}) ->
hash_data(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
%%