mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
move checkpoints in a separate library
This commit is contained in:
parent
85f4b600d2
commit
5d65a75b69
29 changed files with 72 additions and 67 deletions
|
@ -255,7 +255,7 @@ void tests::proxy_core::build_short_history(std::list<crypto::hash> &m_history,
|
|||
m_history.push_front(cit->first);
|
||||
|
||||
size_t n = 1 << m_history.size();
|
||||
while (m_hash2blkidx.end() != cit && cryptonote::null_hash != cit->second.blk.prev_id && n > 0) {
|
||||
while (m_hash2blkidx.end() != cit && crypto::null_hash != cit->second.blk.prev_id && n > 0) {
|
||||
n--;
|
||||
cit = m_hash2blkidx.find(cit->second.blk.prev_id);
|
||||
}
|
||||
|
@ -265,7 +265,7 @@ void tests::proxy_core::build_short_history(std::list<crypto::hash> &m_history,
|
|||
bool tests::proxy_core::add_block(const crypto::hash &_id, const crypto::hash &_longhash, const cryptonote::block &_blk, const cryptonote::blobdata &_blob) {
|
||||
size_t height = 0;
|
||||
|
||||
if (cryptonote::null_hash != _blk.prev_id) {
|
||||
if (crypto::null_hash != _blk.prev_id) {
|
||||
std::unordered_map<crypto::hash, tests::block_index>::const_iterator cit = m_hash2blkidx.find(_blk.prev_id);
|
||||
if (m_hash2blkidx.end() == cit) {
|
||||
cerr << "ERROR: can't find previous block with id \"" << _blk.prev_id << "\"" << endl;
|
||||
|
|
|
@ -46,7 +46,7 @@ namespace tests
|
|||
cryptonote::blobdata blob;
|
||||
std::list<cryptonote::transaction> txes;
|
||||
|
||||
block_index() : height(0), id(cryptonote::null_hash), longhash(cryptonote::null_hash) { }
|
||||
block_index() : height(0), id(crypto::null_hash), longhash(crypto::null_hash) { }
|
||||
block_index(size_t _height, const crypto::hash &_id, const crypto::hash &_longhash, const cryptonote::block &_blk, const cryptonote::blobdata &_blob, const std::list<cryptonote::transaction> &_txes)
|
||||
: height(_height), id(_id), longhash(_longhash), blk(_blk), blob(_blob), txes(_txes) { }
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue