Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
hnt-pub
Miner
Commits
dc20ea56
Commit
dc20ea56
authored
4 years ago
by
Andrew Thompson
Browse files
Options
Download
Email Patches
Plain Diff
Fix BBA indexing to be compatible with bitvectors and bump core for p2p
parent
a11c380f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/handlers/miner_hbbft_handler.erl
+3
-1
src/handlers/miner_hbbft_handler.erl
with
3 additions
and
1 deletion
+3
-1
src/handlers/miner_hbbft_handler.erl
+
3
-
1
View file @
dc20ea56
...
...
@@ -343,7 +343,9 @@ handle_message(BinMsg, Index, State=#state{hbbft = HBBFT}) ->
callback_message
(_,
_,
_)
->
none
.
make_bba
(
Sz
,
Metadata
)
->
M
=
maps
:
from_list
([{
Id
,
true
}
||
{
Id
,
_}
<-
Metadata
]),
%% note that BBA indices are 0 indexed, but bitvectors are 1 indexed
%% so we correct that here
M
=
maps
:
from_list
([{
Id
+
1
,
true
}
||
{
Id
,
_}
<-
Metadata
]),
M1
=
lists
:
foldl
(
fun
(
Id
,
Acc
)
->
case
Acc
of
#
{
Id
:
=
_}
->
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets