Beispiel #1
0
        public async Task <bool> UploadErrorReports(byte[] reports, KeyStore serviceAccount)
        {
            if (serviceAccount == null)
            {
                Log.Trace($"UploadErrorReports failed, no service account set.", this);
                return(false);
            }

            var m    = new ClientErrorReportMessage(serviceAccount.KeyIndex, serviceAccount.ChainId, new SignedData(reports, serviceAccount.DecryptedKey));
            var sent = await SendMessage(serviceAccount.AccountId, m);

            return(sent && await WaitResponse(m) is ClientErrorReportResponseMessage);
        }
        public async Task <bool> UploadErrorReportsCoreAccount(byte[] reports, int chainId)
        {
            if (CurrentCoreAccount == null)
            {
                Log.Trace($"UploadErrorReports failed, no core account set.", this);
                return(false);
            }

            var m    = new ClientErrorReportMessage(CurrentCoreAccount.KeyIndex, chainId, new SignedData(reports, CurrentCoreAccount.DecryptedKey));
            var sent = await SendMessage(CurrentCoreAccount.AccountId, m);

            return(sent && await WaitResponse(m) is ClientErrorReportResponseMessage);
        }