示例#1
0
void InProcessNode::getNewBlocksAsync(std::list<crypto::hash>& knownBlockIds, std::list<cryptonote::block_complete_entry>& newBlocks,
    uint64_t& startHeight, const Callback& callback)
{
  std::error_code ec;
  {
    std::unique_lock<std::mutex> lock(mutex);
    ec = doGetNewBlocks(std::move(knownBlockIds), newBlocks, startHeight);
  }

  callback(ec);
}
示例#2
0
void InProcessNode::getNewBlocksAsync(std::vector<Crypto::Hash>& knownBlockIds, std::vector<CryptoNote::block_complete_entry>& newBlocks,
  uint32_t& startHeight, const Callback& callback)
{
  std::error_code ec = doGetNewBlocks(std::move(knownBlockIds), newBlocks, startHeight);
  callback(ec);
}