From c91a9261e68763a6f8058021fcb7d9ad3932ff4d Mon Sep 17 00:00:00 2001 From: Javad Saberlatibari <76922325+javadsaberlatibari@users.noreply.github.com> Date: Wed, 27 Mar 2024 13:17:09 -0700 Subject: [PATCH] Add files via upload --- wellcoordination/benchmark/rubis.hpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/wellcoordination/benchmark/rubis.hpp b/wellcoordination/benchmark/rubis.hpp index 040c694..b53a502 100644 --- a/wellcoordination/benchmark/rubis.hpp +++ b/wellcoordination/benchmark/rubis.hpp @@ -20,7 +20,9 @@ class Rubis : public ReplicatedObject //registerUser 2 1(id) by leader //openAuction 1(id) by default consider 100 auctions are open. //placeBid 3 3(auctionid+userid+value) -//query 4 like movie does not consider read. +//openauction 4 +//closeauction +//query 6 like movie does not consider read. private: public: @@ -96,7 +98,9 @@ class Rubis : public ReplicatedObject // 0 void sellItem(int s_id, int value) { - auction[s_id][0]=value; + if(auction[a_id][3]==1){ + auction[s_id][0]=value; + } } // 1 void storeBuyNow(int s_id, int value) @@ -113,7 +117,7 @@ class Rubis : public ReplicatedObject // 3 void placeBid(int a_id, int u_id, int value) { - if(registeredusers[u_id]){ + if(registeredusers[u_id] && auction[a_id][3]==1){ if(auction[a_id][2]