Changed time_t to uint64_t for serialization
time_t is implementation-, architecture-, and apparently compiler-dependent. As an example, on my machine if I build a 64-bit binary, sizeof(time_t) is 8, but for a 32-bit binary it's 4. uint64_t is therefore much more consistent for serialization, given that RPC calls are potentially made between different machines.
This commit is contained in:
parent
ad4061002c
commit
a99143444c
1 changed files with 3 additions and 3 deletions
|
@ -27,14 +27,14 @@ namespace cryptonote
|
||||||
std::string peer_id;
|
std::string peer_id;
|
||||||
|
|
||||||
uint64_t recv_count;
|
uint64_t recv_count;
|
||||||
time_t recv_idle_time;
|
uint64_t recv_idle_time;
|
||||||
|
|
||||||
uint64_t send_count;
|
uint64_t send_count;
|
||||||
time_t send_idle_time;
|
uint64_t send_idle_time;
|
||||||
|
|
||||||
std::string state;
|
std::string state;
|
||||||
|
|
||||||
time_t live_time;
|
uint64_t live_time;
|
||||||
|
|
||||||
BEGIN_KV_SERIALIZE_MAP()
|
BEGIN_KV_SERIALIZE_MAP()
|
||||||
KV_SERIALIZE(incoming)
|
KV_SERIALIZE(incoming)
|
||||||
|
|
Loading…
Reference in a new issue