//Executa um Put com o conteudo do registo "register" na key "key" public void PutInternal(int register, string key) { if (SuperTransaction != null && SuperTransaction.PutValue(key, Registers[register - 1]) == false) { Console.BackgroundColor = ConsoleColor.Red; SuperTransaction = null; } }
//Executa um get na key "key" e guarda o conteudo no register public void GetInternal(int register, string key) { string returnValue =null; if(SuperTransaction!=null) returnValue= SuperTransaction.GetValue(key); if (returnValue == null) { Console.BackgroundColor = ConsoleColor.Red; SuperTransaction = null; } else Registers[register - 1] = returnValue; }
//mete o valor "value" na key "key" public void PutVAlInternal(string key, string value) { if (SuperTransaction != null && SuperTransaction.PutValue(key, value) == false) { Console.BackgroundColor = ConsoleColor.Red; SuperTransaction = null; } }
public void BeginTxInternal() { SuperTransaction = new Transaction(); }
public async Task <Return> BroadcastTransactionAsync(Transaction transaction) { return(await _grpcClient.BroadcastTransactionAsync(transaction)); }