mirror of
https://github.com/monero-project/monero.git
synced 2025-01-28 18:56:31 +02:00
Move block_header_responce into its own file
This commit is contained in:
parent
760c1e3890
commit
62a63ea382
38
src/rpc/block_header_responce.h
Normal file
38
src/rpc/block_header_responce.h
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "serialization/keyvalue_serialization.h"
|
||||||
|
|
||||||
|
namespace cryptonote {
|
||||||
|
struct block_header_responce
|
||||||
|
{
|
||||||
|
uint8_t major_version;
|
||||||
|
uint8_t minor_version;
|
||||||
|
uint64_t timestamp;
|
||||||
|
std::string prev_hash;
|
||||||
|
uint32_t nonce;
|
||||||
|
bool orphan_status;
|
||||||
|
uint64_t height;
|
||||||
|
uint64_t depth;
|
||||||
|
std::string hash;
|
||||||
|
difficulty_type difficulty;
|
||||||
|
uint64_t reward;
|
||||||
|
size_t tx_count;
|
||||||
|
uint64_t cumulative_difficulty;
|
||||||
|
|
||||||
|
BEGIN_KV_SERIALIZE_MAP()
|
||||||
|
KV_SERIALIZE(major_version)
|
||||||
|
KV_SERIALIZE(minor_version)
|
||||||
|
KV_SERIALIZE(timestamp)
|
||||||
|
KV_SERIALIZE(prev_hash)
|
||||||
|
KV_SERIALIZE(nonce)
|
||||||
|
KV_SERIALIZE(orphan_status)
|
||||||
|
KV_SERIALIZE(height)
|
||||||
|
KV_SERIALIZE(depth)
|
||||||
|
KV_SERIALIZE(hash)
|
||||||
|
KV_SERIALIZE(difficulty)
|
||||||
|
KV_SERIALIZE(reward)
|
||||||
|
KV_SERIALIZE(tx_count)
|
||||||
|
KV_SERIALIZE(cumulative_difficulty)
|
||||||
|
END_KV_SERIALIZE_MAP()
|
||||||
|
};
|
||||||
|
}
|
@ -7,6 +7,7 @@
|
|||||||
#include "cryptonote_core/cryptonote_basic.h"
|
#include "cryptonote_core/cryptonote_basic.h"
|
||||||
#include "cryptonote_core/difficulty.h"
|
#include "cryptonote_core/difficulty.h"
|
||||||
#include "crypto/hash.h"
|
#include "crypto/hash.h"
|
||||||
|
#include "rpc/block_header_responce.h"
|
||||||
#include "p2p/connection_info.h"
|
#include "p2p/connection_info.h"
|
||||||
|
|
||||||
namespace cryptonote
|
namespace cryptonote
|
||||||
@ -385,39 +386,6 @@ namespace cryptonote
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
struct block_header_responce
|
|
||||||
{
|
|
||||||
uint8_t major_version;
|
|
||||||
uint8_t minor_version;
|
|
||||||
uint64_t timestamp;
|
|
||||||
std::string prev_hash;
|
|
||||||
uint32_t nonce;
|
|
||||||
bool orphan_status;
|
|
||||||
uint64_t height;
|
|
||||||
uint64_t depth;
|
|
||||||
std::string hash;
|
|
||||||
difficulty_type difficulty;
|
|
||||||
uint64_t reward;
|
|
||||||
size_t tx_count;
|
|
||||||
uint64_t cumulative_difficulty;
|
|
||||||
|
|
||||||
BEGIN_KV_SERIALIZE_MAP()
|
|
||||||
KV_SERIALIZE(major_version)
|
|
||||||
KV_SERIALIZE(minor_version)
|
|
||||||
KV_SERIALIZE(timestamp)
|
|
||||||
KV_SERIALIZE(prev_hash)
|
|
||||||
KV_SERIALIZE(nonce)
|
|
||||||
KV_SERIALIZE(orphan_status)
|
|
||||||
KV_SERIALIZE(height)
|
|
||||||
KV_SERIALIZE(depth)
|
|
||||||
KV_SERIALIZE(hash)
|
|
||||||
KV_SERIALIZE(difficulty)
|
|
||||||
KV_SERIALIZE(reward)
|
|
||||||
KV_SERIALIZE(tx_count)
|
|
||||||
KV_SERIALIZE(cumulative_difficulty)
|
|
||||||
END_KV_SERIALIZE_MAP()
|
|
||||||
};
|
|
||||||
|
|
||||||
struct COMMAND_RPC_GET_LAST_BLOCK_HEADER
|
struct COMMAND_RPC_GET_LAST_BLOCK_HEADER
|
||||||
{
|
{
|
||||||
typedef std::list<std::string> request;
|
typedef std::list<std::string> request;
|
||||||
|
Loading…
Reference in New Issue
Block a user