fix check if COMMAND_RPC_GET_ALT_BLOCKS_HASHES exists added

master
moneroexamples 8 years ago
parent 68c3d97fd8
commit 160a1abe48

@ -11,14 +11,16 @@
#include <mutex>
namespace
{
// can be used to check if given class/struct exist
// from: https://stackoverflow.com/a/10722840/248823
template <typename T>
struct has_destructor
{
// can be used to check if given class/struct exist
// from: https://stackoverflow.com/a/10722840/248823
template <typename T>
struct has_destructor
{
// has destructor
template <typename A>
static std::true_type test(decltype(declval<A>().~A()) *)
@ -37,11 +39,22 @@ namespace
typedef decltype(test<T>(0)) type;
static const bool value = type::value;
};
};
}
namespace cryptonote
{
// declare struct in monero's cryptonote namespace.
// monero should provide definition for this,
// but we need to have it declared as we are going to
// check if its definition exist or not. depending on this
// we decide what gets to be defined as
// get_alt_blocks(vector<string>& alt_blocks_hashes);
struct COMMAND_RPC_GET_ALT_BLOCKS_HASHES;
}
namespace xmreg
{
@ -49,12 +62,7 @@ using namespace cryptonote;
using namespace crypto;
using namespace std;
// declare it. monero should provide definition for this,
// but we need to have it declared as we are going to
// check if its definition exist or not. depending on this
// we decide what gets to be defined as
// get_alt_blocks(vector<string>& alt_blocks_hashes);
struct COMMAND_RPC_GET_ALT_BLOCKS_HASHES;
class rpccalls
{

Loading…
Cancel
Save