Esempio n. 1
0
 public DataAccountStorageEntry(Unpacker unpacker) : base(unpacker)
 {
     if (unpacker.UnpackBool())
     {
         LastTargetedTransaction = new TransactionEntry(unpacker);
     }
 }
Esempio n. 2
0
        protected StorageEntryBase(Unpacker unpacker)
        {
            unpacker.Unpack(out Id);
            LastAccessed = unpacker.UnpackLong();

            if (unpacker.UnpackBool())
            {
                LastTransaction = new TransactionEntry(unpacker);
            }
        }
Esempio n. 3
0
        public bool UpdateTargeted(long transactionId, long timestamp)
        {
            if (LastTargetedTransaction == null)
            {
                LastTargetedTransaction = new TransactionEntry(transactionId, timestamp, 0);
                return(true);
            }

            if (transactionId > LastTargetedTransaction.LastTransactionId)
            {
                LastTargetedTransaction = new TransactionEntry(transactionId, timestamp, 0);
                return(true);
            }

            return(false);
        }
Esempio n. 4
0
        public bool Update(long transactionId, long timestamp, long count)
        {
            if (LastTransaction == null)
            {
                LastTransaction = new TransactionEntry(transactionId, timestamp, count);
                return(true);
            }

            if (transactionId > LastTransaction.LastTransactionId)
            {
                LastTransaction = new TransactionEntry(transactionId, timestamp, count);
                return(true);
            }

            return(false);
        }