Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing definition of operator() for hashing support #659

Merged
merged 2 commits into from
Mar 13, 2020

Conversation

AndrejMitrovic
Copy link
Contributor

std::hash is used for things like storing structs in std::set / std::map.

Required for the quorum intersection checker.

It makes it easier to see if there are any
missing object files.
@AndrejMitrovic AndrejMitrovic added the type-bug Things don't work as they were intended to, or the way they were intended to work doesn't make sense label Mar 13, 2020
@codecov
Copy link

codecov bot commented Mar 13, 2020

Codecov Report

Merging #659 into v0.x.x will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           v0.x.x     #659      +/-   ##
==========================================
+ Coverage   90.18%   90.19%   +<.01%     
==========================================
  Files          62       63       +1     
  Lines        4648     4649       +1     
==========================================
+ Hits         4192     4193       +1     
  Misses        456      456
Flag Coverage Δ
#integration 54.69% <100%> (+0.02%) ⬆️
#unittests 88.92% <100%> (ø) ⬆️
Impacted Files Coverage Δ
source/scpd/scp/SCP.d 100% <100%> (ø)
source/agora/network/NetworkManager.d 78.98% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ab8b39f...123ef1c. Read the comment docs.

@Geod24
Copy link
Collaborator

Geod24 commented Mar 13, 2020

I guess you want to import the quorum intersection check in C++ ?

void
initialize()
{
crypto_shorthash_keygen(sKey);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has to be called so you might want to stick a shared static this in the bindings

@AndrejMitrovic
Copy link
Contributor Author

I guess you want to import the quorum intersection check in C++ ?

Yes. And it's a lot of code (2 Kloc or so) so I opted to bind to it rather than port it to D.

Updated to add the initialization call.

Copy link
Collaborator

@Geod24 Geod24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Geod24 Geod24 merged commit dbd8a5c into bosagora:v0.x.x Mar 13, 2020
@AndrejMitrovic AndrejMitrovic deleted the missing-hash branch March 13, 2020 05:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug Things don't work as they were intended to, or the way they were intended to work doesn't make sense
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants