Skip to content

Commit

Permalink
Fix #includes for GCC11
Browse files Browse the repository at this point in the history
  • Loading branch information
chfast committed Oct 12, 2021
1 parent ad11a02 commit a48e8c2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
18 changes: 8 additions & 10 deletions test/fakeminer/fakeminer.cpp
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
// ethash: C/C++ implementation of Ethash, the Ethereum Proof of Work algorithm.
// Copyright 2018-2019 Pawel Bylica.
// Copyright 2018 Pawel Bylica.
// Licensed under the Apache License, Version 2.0.

#include <ethash/ethash.hpp>
#include <ethash/global_context.hpp>

#include <atomic>
#include <chrono>
#include <future>
#include <iomanip>
#include <iostream>
#include <string>
#include <unordered_map>
#include <thread>
#include <vector>


using namespace std::chrono;
using timer = std::chrono::steady_clock;

Expand All @@ -25,8 +23,8 @@ class ethash_interface
public:
virtual ~ethash_interface() noexcept = default;

virtual void search(const ethash::hash256& header_hash, uint64_t nonce, size_t iterations) const
noexcept = 0;
virtual void search(
const ethash::hash256& header_hash, uint64_t nonce, size_t iterations) const noexcept = 0;
};

class ethash_light : public ethash_interface
Expand All @@ -38,8 +36,8 @@ class ethash_light : public ethash_interface
: context(ethash::get_global_epoch_context(epoch_number))
{}

void search(const ethash::hash256& header_hash, uint64_t nonce, size_t iterations) const
noexcept override
void search(const ethash::hash256& header_hash, uint64_t nonce,
size_t iterations) const noexcept override
{
ethash::search_light(context, header_hash, {}, nonce, iterations);
}
Expand All @@ -54,8 +52,8 @@ class ethash_full : public ethash_interface
: context(ethash::get_global_epoch_context_full(epoch_number))
{}

void search(const ethash::hash256& header_hash, uint64_t nonce, size_t iterations) const
noexcept override
void search(const ethash::hash256& header_hash, uint64_t nonce,
size_t iterations) const noexcept override
{
ethash::search(context, header_hash, {}, nonce, iterations);
}
Expand Down
6 changes: 2 additions & 4 deletions test/unittests/test_global_context.cpp
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
// ethash: C/C++ implementation of Ethash, the Ethereum Proof of Work algorithm.
// Copyright 2018-2019 Pawel Bylica.
// Copyright 2018 Pawel Bylica.
// Licensed under the Apache License, Version 2.0.

#include "helpers.hpp"
#include "test_cases.hpp"

#include <ethash/ethash-internal.hpp>
#include <ethash/global_context.hpp>

#include <gtest/gtest.h>

#include <array>
#include <future>
#include <thread>

using namespace ethash;

Expand Down

0 comments on commit a48e8c2

Please sign in to comment.