/**
* Checks for malicious activity and updates the local copy of the block chain.
*/
- void validateAndUpdate(Array<Slot*> *newSlots, bool acceptUpdatesToLocal);
+ void validateAndUpdate(Array<Slot *> *newSlots, bool acceptUpdatesToLocal);
void updateLiveStateFromServer();
void arbitrateFromServer();
- Pair<bool, bool> arbitrateOnLocalTransaction(Transaction * transaction);
+ Pair<bool, bool> arbitrateOnLocalTransaction(Transaction *transaction);
/**
* Compacts the arbitration data my merging commits and aggregating aborts so that a single large push of commits can be done instead of many small updates
/**
* Add the new key to the arbitrators table and update the set of live new keys (in case of a rescued new key message)
*/
- void processEntry(NewKey * entry);
+ void processEntry(NewKey *entry);
/**
* Process new table status entries and set dead the old ones as new ones come in.
* Add a rejected message entry to the watch set to keep track of which clients have seen that
* rejected message entry and which have not.
*/
- void addWatchVector(int64_t machineId, RejectedMessage * entry);
+ void addWatchVector(int64_t machineId, RejectedMessage *entry);
/**
* Check if the HMAC chain is not violated
*/
- void checkHMACChain(SlotIndexer * indexer, Array<Slot*> *newSlots);
+ void checkHMACChain(SlotIndexer *indexer, Array<Slot *> *newSlots);
public:
/**
* Rebuild the table from scratch by pulling the latest block chain from the server.
*/
- bool update();
+
void rebuild();
void addLocalCommunication(int64_t arbitrator, IoTString *hostName, int portNumber);
int64_t getArbitrator(IoTString *key);
IoTString *getCommitted(IoTString *key);
IoTString *getSpeculative(IoTString *key);
IoTString *getCommittedAtomic(IoTString *key);
+ IoTString *getSpeculativeAtomic(IoTString *key);
+ bool update();
bool createNewKey(IoTString *keyName, int64_t machineId);
void startTransaction();
void addKV(IoTString *key, IoTString *value);