void abort(Transaction t,int timestamp){
		out.println("Transaction "+t.getName()+" aborting at timestamp "+timestamp);
		System.out.println(blockedTransactions);
		Map<String, String> m=t.end(TransactionState.Aborted);
		Set<String> variables=m.keySet();
		System.out.println(variables);
		for(Integer siteNum:sites.keySet()){
			Site site=sites.get(siteNum);
			site.abort(t);
		}
		
		for(String v:variables){
			boolean foundWrite=false;
			if(blockedTransactions.containsKey(v)){
				List<Transaction> blockedTransaction=blockedTransactions.get(v);
				while(!blockedTransaction.isEmpty()&&!foundWrite){
					Transaction temp = blockedTransaction.remove(0);
					if(blockedTransaction.size()==0)
						blockedTransactions.remove(v);
					Map<Boolean,Integer> map=temp.unblock();
					if(map.containsKey(true)){
						//true means it was a read operation that it was blocked on.
						read(temp.getName(),v,timestamp);
					}
					else{
						foundWrite=true;
						write(temp.getName(),v,map.get(false),timestamp);
					}
				}
				
				if(blockedTransaction.isEmpty()){
					blockedTransactions.remove(v);
				}
			}
		}
		transactions.remove(t);
	}