public DataAccountStorageEntry(Unpacker unpacker) : base(unpacker) { if (unpacker.UnpackBool()) { LastTargetedTransaction = new TransactionEntry(unpacker); } }
protected StorageEntryBase(Unpacker unpacker) { unpacker.Unpack(out Id); LastAccessed = unpacker.UnpackLong(); if (unpacker.UnpackBool()) { LastTransaction = new TransactionEntry(unpacker); } }
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); }
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); }