forked from lthn/blockchain
Merge branch 'master' into frontend
This commit is contained in:
commit
4b6db5279d
3 changed files with 6 additions and 2 deletions
|
|
@ -1062,8 +1062,9 @@ namespace nodetool
|
|||
ce.time_started = cntxt.m_started;
|
||||
ce.last_recv = cntxt.m_last_recv;
|
||||
ce.last_send = cntxt.m_last_send;
|
||||
std::strncpy(ce.version, cntxt.m_remote_version.c_str(), std::min(sizeof(ce.version), cntxt.m_remote_version.size()));
|
||||
ce.version[sizeof(ce.version) - 1] = 0; //null terminating just to be sure
|
||||
size_t len = std::min(sizeof(ce.version) - 1, cntxt.m_remote_version.size());
|
||||
std::strncpy(ce.version, cntxt.m_remote_version.c_str(), len);
|
||||
ce.version[len] = 0; //null terminating just to be sure
|
||||
rsp.connections_list.push_back(ce);
|
||||
return true;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -794,6 +794,7 @@ namespace currency
|
|||
blobdata block_blob = t_serializable_object_to_blob(b);
|
||||
|
||||
res.blocktemplate_blob = string_tools::buff_to_hex_nodelimer(block_blob);
|
||||
res.prev_hash = string_tools::pod_to_hex(b.prev_id);
|
||||
res.status = CORE_RPC_STATUS_OK;
|
||||
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -792,6 +792,7 @@ namespace currency
|
|||
uint64_t height;
|
||||
crypto::hash seed;
|
||||
blobdata blocktemplate_blob;
|
||||
std::string prev_hash;
|
||||
std::string status;
|
||||
|
||||
BEGIN_KV_SERIALIZE_MAP()
|
||||
|
|
@ -799,6 +800,7 @@ namespace currency
|
|||
KV_SERIALIZE(height)
|
||||
KV_SERIALIZE_POD_AS_HEX_STRING(seed)
|
||||
KV_SERIALIZE(blocktemplate_blob)
|
||||
KV_SERIALIZE(prev_hash)
|
||||
KV_SERIALIZE(status)
|
||||
END_KV_SERIALIZE_MAP()
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue