private void loadUnlockTransactionsJobs(CryptoNote.ISerializer serializer) { auto index = m_unlockTransactions.get <TransactionHashIndex>(); auto walletsIndex = m_walletsContainer.get <KeysIndex>(); ulong jobsCount = 0; serializer.functorMethod(jobsCount, "unlockTransactionsJobsCount"); for (ulong i = 0; i < jobsCount; ++i) { UnlockTransactionJobDtoV2 dto = new UnlockTransactionJobDtoV2(); serializer.functorMethod(dto, "unlockTransactionsJob"); var walletIt = walletsIndex.find(dto.walletSpendPublicKey); if (walletIt != walletsIndex.end()) { UnlockTransactionJob job = new UnlockTransactionJob(); job.blockHeight = dto.blockHeight; job.transactionHash = dto.transactionHash; job.container = walletIt.container; index.insert(std::move(job)); } } }
//C++ TO C# CONVERTER WARNING: 'const' methods are not available in C#: //ORIGINAL LINE: const BinaryArray& getBlockHashingBinaryArray() const public BinaryArray getBlockHashingBinaryArray() { if (!blockHashingBinaryArray.is_initialized()) { blockHashingBinaryArray = BinaryArray(); auto result = blockHashingBinaryArray.get(); if (!CryptoNote.GlobalMembers.toBinaryArray((BlockHeader)block, ref result)) { blockHashingBinaryArray.reset(); throw new System.Exception("Can't serialize BlockHeader"); } auto treeHash = getTransactionTreeHash(); result.insert(result.end(), treeHash.data, treeHash.data + 32); var transactionCount = Common.asBinaryArray(Tools.get_varint_data(block.transactionHashes.size() + 1)); result.insert(result.end(), transactionCount.begin(), transactionCount.end()); } return(blockHashingBinaryArray.get()); }