Beispiel #1
0
        private void loadTransactions(CryptoNote.ISerializer serializer)
        {
            ulong count = 0;

            serializer.functorMethod(count, "transactionCount");

            m_transactions.get <RandomAccessIndex>().reserve(count);

            for (ulong i = 0; i < count; ++i)
            {
                WalletTransactionDtoV2 dto = new WalletTransactionDtoV2();
                serializer.functorMethod(dto, "transaction");

                WalletTransaction tx = new WalletTransaction();
                tx.state        = dto.state;
                tx.timestamp    = dto.timestamp;
                tx.blockHeight  = dto.blockHeight;
                tx.hash         = dto.hash;
                tx.totalAmount  = dto.totalAmount;
                tx.fee          = dto.fee;
                tx.creationTime = dto.creationTime;
                tx.unlockTime   = dto.unlockTime;
                tx.extra        = dto.extra;
                tx.isBase       = dto.isBase;

                m_transactions.get <RandomAccessIndex>().push_back(std::move(tx));
            }
        }
Beispiel #2
0
 public WalletTransactionDtoV2(CryptoNote.WalletTransaction wallet)
 {
     state        = wallet.state;
     timestamp    = wallet.timestamp;
     blockHeight  = wallet.blockHeight;
     hash         = wallet.hash;
     totalAmount  = wallet.totalAmount;
     fee          = wallet.fee;
     creationTime = wallet.creationTime;
     unlockTime   = wallet.unlockTime;
     extra        = wallet.extra;
     isBase       = wallet.isBase;
 }