Example #1
0
string Leg::getConcernPrice()
{
	string s;
	s = buySell == BUY ? getContract() + ".ask" : getContract() + ".bid";
	TRACE_LOG("getConcernPrice : %s , %s", buySell == BUY ? "BUY" : "SELL", s.c_str()); 
    return s;
}
Example #2
0
// void trusted_rpc_handler(unsigned callNum, void *params)
 void handler_rpc(unsigned callNum, void *params)
{
	switch(callNum){
	case 0:
		/*Only initialize seed and heap once*/
		if (count == 0){
			printf("Initializing Trusted Service\n");
			_main((uint32_t)params);
			count++;
		}
		else
			printf("Already initialized trusted service");
		break;
	case 1:
		if(count !=0)
			initFlashData(params);
		else
			printf("Trusted service not initialized");
		break;
	case 2:
		//if(count !=0)
		//verifyContract(params);
		break;
	case 3:
		if(count !=0)
			getContract(params);
		else
			printf("Trusted service not initialized");
		break;
	case 4:
		read();
		break;
	default:
		printf("Unknown trusted operation: %d\n", callNum);
	}
	finish_rpc();
}