This commit is contained in:
everoddandeven 2024-10-11 00:42:30 +02:00
parent 6d381d6cfe
commit 3b554e3bb8
89 changed files with 1021 additions and 1579 deletions

View file

@ -43,15 +43,18 @@ export class AppComponent {
this.load();
}
private async load(): Promise<void> {
private load(): void {
this.loading = true;
try {
this.daemonRunning = await this.daemonService.isRunning();
}
catch(error) {
this.daemonService.isRunning().then((running: boolean) => {
this.daemonRunning = running;
this.loading;
}).catch((error) => {
console.error(error);
}
this.daemonRunning = false;
}).finally(() => {
this.loading = false;
});
this.loading = false;
}

View file

@ -18,11 +18,9 @@ import { BlockchainModule } from './pages/blockchain/blockchain.module';
import { AppComponent } from './app.component';
import { LoadComponent } from "./shared/components/load/load.component";
import { BansModule } from './pages/bans/bans.module';
import { NavbarComponent } from "./shared/components/navbar/navbar.component";
import { MiningModule } from './pages/mining/mining.module';
import { TransactionsModule } from './pages/transactions/transactions.module';
import { OutputsModule } from './pages/outputs/outputs.module';
import { SidebarComponent } from './shared/components';
import { SettingsModule } from './pages/settings/settings.module';
import { LogsModule } from './pages/logs/logs.module';
import { VersionModule } from './pages/version/version.module';

View file

@ -225,7 +225,9 @@ export class DaemonDataService {
}
this._firstRefresh = true;
this.refreshInterval = setInterval(() => {
this.refresh();
this.refresh().then().catch((error: any) => {
console.error(error);
});
},this.refreshTimeoutMs);
}
@ -343,6 +345,8 @@ export class DaemonDataService {
if (firstRefresh) {
this.daemonService.pruneBlockchain(true).then((info) => {
this._isBlockchainPruned = info.pruned;
}).catch((error) => {
console.error(error);
});
}
this._gettingIsBlockchainPruned = false;

View file

@ -1,667 +0,0 @@
import { HttpClient, HttpErrorResponse } from "@angular/common/http";
import { CoreIsBusyError, MethodNotFoundError, JsonRPCRequest, RPCRequest, AddAuxPoWRequest, AddedAuxPow, AuxPoW, Ban, BannedRequest, Block, BlockchainPruneInfo, BlockCount, BlockHeader, BlockTemplate, CalculatePoWHashRequest, Chain, CoinbaseTxSum, Connection, DaemonInfo, DaemonVersion, FeeEstimate, FlushCacheRequest, FlushTxPoolRequest, GenerateBlocksRequest, GeneratedBlocks, GetAltBlockHashesRequest, GetAlternateChainsRequest, GetBansRequest, GetBlockCountRequest, GetBlockHashRequest, GetBlockHeaderByHashRequest, GetBlockHeaderByHeightRequest, GetBlockHeadersRangeRequest, GetBlockRequest, GetBlockTemplateRequest, GetCoinbaseTxSumRequest, GetConnectionsRequest, GetFeeEstimateRequest, GetInfoRequest, GetLastBlockHeaderRequest, GetMinerDataRequest, GetNetStatsRequest, GetOutputDistributionRequest, GetOutputHistogramRequest, GetOutsRequest, GetPublicNodesRequest, GetTransactionPoolHashesBinaryRequest, GetTransactionPoolHashesRequest, GetTxPoolBacklogRequest, GetVersionRequest, HardForkInfo, HardForkInfoRequest, HistogramEntry, InPeersRequest, IsKeyImageSpentRequest, MinerData, MiningStatus, MiningStatusRequest, NetStats, OutKey, OutPeersRequest, Output, OutputDistribution, PopBlocksRequest, PruneBlockchainRequest, PublicNode, RelayTxRequest, SaveBcRequest, SendRawTransactionRequest, SetBansRequest, SetBootstrapDaemonRequest, SetLimitRequest, StartMiningRequest, StopMiningRequest, SubmitBlockRequest, SyncInfo, SyncInfoRequest, TxBacklogEntry, TxInfo, UpdateInfo, UpdateRequest, StopDaemonRequest, EmptyRpcRequest, DaemonSettings } from "../../../../common";
import { firstValueFrom } from "rxjs";
import { ElectronService } from "../electron/electron.service";
import { IDBPDatabase, openDB } from "idb";
export class DaemonClient {
private electronService: ElectronService;
private httpClient: HttpClient;
private url: string;
private readonly versionApiUrl: string = 'https://api.github.com/repos/monero-project/monero/releases/latest';
private dbName = 'DaemonSettingsDB';
private storeName = 'settingsStore';
private openDbPromise: Promise<IDBPDatabase>;
public daemonRunning: boolean;
public settings: DaemonSettings;
private readonly headers: { [key: string]: string } = {
"Access-Control-Allow-Headers": "*", // this will allow all CORS requests
"Access-Control-Allow-Methods": 'POST,GET' // this states the allowed methods
};
constructor(httpClient: HttpClient, url: string, electronService: ElectronService) {
this.httpClient = httpClient;
this.url = url;
this.electronService = electronService;
this.daemonRunning = false;
this.openDbPromise = this.openDatabase();
this.settings = this.loadSettings();
}
private async openDatabase(): Promise<IDBPDatabase> {
return openDB(this.dbName, 1, {
upgrade(db) {
// Crea un archivio (store) per i settings se non esiste già
if (!db.objectStoreNames.contains('settingsStore')) {
db.createObjectStore('settingsStore', {
keyPath: 'id',
autoIncrement: true,
});
}
},
});
}
public async saveSettings(settings: DaemonSettings): Promise<void> {
const db = await this.openDbPromise;
await db.put(this.storeName, { id: 1, ...settings });
this.settings = settings;
}
public async getSettings(): Promise<DaemonSettings> {
const db = await this.openDbPromise;
const result = await db.get(this.storeName, 1);
if (result) {
this.settings = DaemonSettings.parse(result);
}
else
{
this.settings = new DaemonSettings();
}
return this.settings;
}
public async deleteSettings(): Promise<void> {
const db = await this.openDbPromise;
await db.delete(this.storeName, 1);
}
private loadSettings(): DaemonSettings {
const settings = new DaemonSettings();
settings.testnet = true;
settings.fastBlockSync = true;
settings.pruneBlockchain = true;
settings.syncPrunedBlocks = true;
settings.confirmExternalBind = true;
settings.logLevel = 1;
settings.rpcAccessControlOrigins = "*";
return settings;
}
private raiseRpcError(error: { code: number, message: string }): void {
if (error.code == -9) {
throw new CoreIsBusyError();
}
else if (error.code == -32601) {
throw new MethodNotFoundError();
}
else
{
throw new Error(error.message);
}
}
private async delay(ms: number = 0): Promise<void> {
await new Promise<void>(f => setTimeout(f, ms));
}
private async get(uri: string): Promise<{[key: string]: any}> {
return await firstValueFrom<{ [key: string]: any }>(this.httpClient.get(`${uri}`,this.headers));
}
private async post(uri: string, params: {[key: string]: any} = {}): Promise<{[key: string]: any}> {
return await firstValueFrom<{ [key: string]: any }>(this.httpClient.post(`${uri}`, params, this.headers));
}
private async callRpc(request: RPCRequest): Promise<{ [key: string]: any }> {
try {
let method: string = '';
if (request instanceof JsonRPCRequest) {
method = 'json_rpc';
}
else {
method = request.method;
}
const response = await this.post(`${this.url}/${method}`, request.toDictionary());
if (response.error) {
this.raiseRpcError(response.error);
}
return response;
}
catch (error) {
if (error instanceof HttpErrorResponse && error.status == 0) {
const wasRunning = this.daemonRunning;
this.daemonRunning = false;
if (wasRunning) {
//this.onDaemonStart.emit(false);
}
}
throw error;
}
}
public async startDaemon(): Promise<boolean> {
if (await this.isRunning()) {
console.warn("Daemon already running");
return false;
}
if (!this.electronService.isElectron) {
console.error("Could not start monero daemon: not electron app");
return false;
}
console.log("Starting daemon");
const settings = await this.getSettings();
this.electronService.ipcRenderer.send('start-monerod', settings.toCommandOptions());
await this.delay(3000);
if (await this.isRunning(true)) {
console.log("Daemon started");
return true;
}
else
{
console.log("Daemon not started");
return false;
}
}
public async isRunning(force: boolean = false): Promise<boolean> {
try {
if (!force && this.daemonRunning != undefined) {
return this.daemonRunning;
}
await this.callRpc(new EmptyRpcRequest());
}
catch(error) {
if (error instanceof MethodNotFoundError) {
this.daemonRunning = true;
return this.daemonRunning;
}
console.error(error);
}
this.daemonRunning = false;
return this.daemonRunning;
}
public async stopDaemon(): Promise<boolean> {
if (!this.daemonRunning) {
console.warn("Daemon not running");
return false;
}
const response = await this.callRpc(new StopDaemonRequest());
console.log(response);
if (typeof response.status == 'string' && response.status != 'OK') {
throw new Error(`Could not stop daemon: ${response.status}`);
}
this.daemonRunning = false;
return true;
}
//#region Request
public async getBlock(heightOrHash: number | string, fillPowHash: boolean = false): Promise<Block> {
const response = await this.callRpc(new GetBlockRequest(heightOrHash, fillPowHash));
if (response.error) {
this.raiseRpcError(response.error);
}
return Block.parse(response.result);
}
public async getBlockCount(): Promise<BlockCount> {
const response = await this.callRpc(new GetBlockCountRequest());
return BlockCount.parse(response.result);
}
public async getBlockHash(blockHeight: number): Promise<string> {
const response = await this.callRpc(new GetBlockHashRequest(blockHeight));
return response.result;
}
public async getBlockTemplate(walletAddress: string, reserveSize: number) {
const response = await this.callRpc(new GetBlockTemplateRequest(walletAddress, reserveSize));
return BlockTemplate.parse(response.result);
}
public async submitBlock(... blockBlobData: string[]): Promise<void> {
const response = await this.callRpc(new SubmitBlockRequest(blockBlobData));
if (response.error) {
if (!response.message) {
throw new Error(`Error code: ${response.code}`);
}
throw new Error(response.message);
}
}
public async generateBlocks(amountOfBlocks: number, walletAddress: string, prevBlock: string = '', startingNonce: number): Promise<GeneratedBlocks> {
const response = await this.callRpc(new GenerateBlocksRequest(amountOfBlocks, walletAddress, prevBlock, startingNonce));
return GeneratedBlocks.parse(response.result);
}
public async getLastBlockHeader(fillPowHash: boolean = false): Promise<BlockHeader> {
const response = await this.callRpc(new GetLastBlockHeaderRequest(fillPowHash));
return BlockHeader.parse(response.block_header);
}
public async getBlockHeaderByHash(hash: string, fillPowHash: boolean = false): Promise<BlockHeader> {
const response = await this.callRpc(new GetBlockHeaderByHashRequest(hash, fillPowHash));
return BlockHeader.parse(response.block_header);
}
public async getBlockHeaderByHeight(height: number, fillPowHash: boolean = false): Promise<BlockHeader> {
const response = await this.callRpc(new GetBlockHeaderByHeightRequest(height, fillPowHash));
return BlockHeader.parse(response.block_header);
}
public async getBlockHeadersRange(startHeight: number, endHeight: number, fillPowHash: boolean = false): Promise<BlockHeader[]> {
const response = await this.callRpc(new GetBlockHeadersRangeRequest(startHeight, endHeight, fillPowHash));
const block_headers: any[] = response.block_headers;
const result: BlockHeader[] = [];
block_headers.forEach((block_header: any) => result.push(BlockHeader.parse(block_header)));
return result;
}
public async getConnections(): Promise<Connection[]> {
const response = await this.callRpc(new GetConnectionsRequest());
const connections: any[] = response.connections;
const result: Connection[] = [];
connections.forEach((connection: any) => result.push(Connection.parse(connection)))
return result;
}
public async getInfo(): Promise<DaemonInfo> {
const response = await this.callRpc(new GetInfoRequest());
return DaemonInfo.parse(response.result);
}
public async hardForkInfo(): Promise<HardForkInfo> {
const response = await this.callRpc(new HardForkInfoRequest());
return HardForkInfo.parse(response.result);
}
public async setBans(...bans: Ban[]) {
const response = await this.callRpc(new SetBansRequest(bans));
if (response.status != 'OK') {
throw new Error(`Error code: ${response.status}`);
}
}
public async getBans(): Promise<Ban[]> {
const response = await this.callRpc(new GetBansRequest());
if (response.error) {
this.raiseRpcError(response.error);
}
const bans: any[] = response.bans;
const result: Ban[] = [];
if (bans) bans.forEach((ban: any) => result.push(Ban.parse(ban)));
return result;
}
public async banned(address: string): Promise<Ban> {
const response = await this.callRpc(new BannedRequest(address));
const result = response.result;
if (result.status != 'OK') {
throw new Error(`Error code: ${result.response}`);
}
return new Ban(address, 0, result.banned, result.seconds);
}
public async flushTxPool(... txIds: string[]): Promise<void> {
const response = await this.callRpc(new FlushTxPoolRequest(txIds));
if (response.status != 'OK') {
throw new Error(`Error code: ${response.status}`);
}
}
public async getOuts(outputs: Output[], getTxId: boolean): Promise<OutKey[]> {
const response = await this.callRpc(new GetOutsRequest(outputs, getTxId));
if (response.error) {
this.raiseRpcError(response.error);
}
const _outkeys: any[] | undefined = response.outs;
const outkeys: OutKey[] = [];
if (_outkeys) _outkeys.forEach((outkey) => outkeys.push(OutKey.parse(outkey)));
return outkeys;
}
public async getOutputHistogram(amounts: number[], minCount: number, maxCount: number, unlocked: boolean, recentCutoff: number): Promise<HistogramEntry[]> {
const response = await this.callRpc(new GetOutputHistogramRequest(amounts, minCount, maxCount, unlocked, recentCutoff));
if (response.error) {
this.raiseRpcError(response.error);
}
const entries: any[] = response.result.histogram;
const result: HistogramEntry[] = [];
if (entries) entries.forEach((entry: any) => result.push(HistogramEntry.parse(entry)));
return result;
}
public async getOutputDistribution(amounts: number[], cumulative: boolean, fromHeight: number, toHeight: number): Promise<OutputDistribution[]> {
const response = await this.callRpc(new GetOutputDistributionRequest(amounts, cumulative, fromHeight, toHeight));
if (response.error) {
this.raiseRpcError(response.error);
}
const entries: any[] = response.result.distributions;
const distributions: OutputDistribution[] = [];
if (entries) entries.forEach((entry) => distributions.push(OutputDistribution.parse(entry)));
return distributions;
}
public async syncInfo(): Promise<SyncInfo> {
const response = await this.callRpc(new SyncInfoRequest());
return SyncInfo.parse(response.result);
}
public async getLatestVersion(): Promise<DaemonVersion> {
const response = await this.get(this.versionApiUrl);
if (typeof response.tag_name != 'string') {
throw new Error("Could not get tag name version");
}
if (typeof response.name != 'string') {
throw new Error("Could not get name version");
}
const nameComponents = response.name.split(",");
if (nameComponents.length == 0) {
throw new Error("Could not get name");
}
const name = nameComponents[0];
return new DaemonVersion(0, true, `Monero '${name}' (${response.tag_name}-release)`);
}
public async getVersion(dontUseRpc: boolean = false): Promise<DaemonVersion> {
if(!dontUseRpc && this.daemonRunning) {
const response = await this.callRpc(new GetVersionRequest());
return DaemonVersion.parse(response.result);
}
else if (dontUseRpc) {
const monerodPath: string = ''; // TO DO get local monerod path
return new Promise<DaemonVersion>((resolve, reject) => {
this.electronService.ipcRenderer.on('on-monerod-version', (event, version: string) => {
resolve(DaemonVersion.parse(version));
});
this.electronService.ipcRenderer.on('on-monerod-version-error', (event, version: string) => {
reject(version);
});
this.electronService.ipcRenderer.send('get-monerod-version', monerodPath);
});
}
throw new Error("Daemon not running");
}
public async getFeeEstimate(): Promise<FeeEstimate> {
const response = await this.callRpc(new GetFeeEstimateRequest());
return FeeEstimate.parse(response.result);
}
public async getAlternateChains(): Promise<Chain[]> {
const response = await this.callRpc(new GetAlternateChainsRequest());
const chains: any[] = response.result.chains ? response.result.chains : [];
const result: Chain[] = [];
chains.forEach((chain: any) => result.push(Chain.parse(chain)));
return result;
}
public async getCoinbaseTxSum(height: number, count: number): Promise<CoinbaseTxSum> {
const response = await this.callRpc(new GetCoinbaseTxSumRequest(height, count));
if (response.error) {
this.raiseRpcError(response.error);
}
return CoinbaseTxSum.parse(response.result);
}
public async relayTx(... txIds: string[]): Promise<void> {
const response = await this.callRpc(new RelayTxRequest(txIds));
if (response.result.status != 'OK') {
throw new Error(`Error code: ${response.result.status}`);
}
}
public async getTxPoolBacklog(): Promise<TxBacklogEntry[]> {
const response = await this.callRpc(new GetTxPoolBacklogRequest());
if (typeof response.status == 'string' && response.status != 'OK') {
throw new Error(`Error code: ${response.status}`)
}
if (!response.bakclog && !response.result) {
return [];
}
if (response.backlog) {
return TxBacklogEntry.fromBinary(response.backlog);
}
else if (response.result.backlog) return TxBacklogEntry.fromBinary(response.result.backlog);
return [];
}
public async pruneBlockchain(check: boolean = false): Promise<BlockchainPruneInfo> {
const response = await this.callRpc(new PruneBlockchainRequest(check));
return BlockchainPruneInfo.parse(response.result);
}
public async calculatePoWHash(majorVersion: number, height: number, blockBlob: string, seedHash: string): Promise<string> {
const response = await this.callRpc(new CalculatePoWHashRequest(majorVersion, height, blockBlob, seedHash));
return response.result;
}
public async flushCache(badTxs: boolean = false, badBlocks: boolean = false): Promise<void> {
const response = await this.callRpc(new FlushCacheRequest(badTxs, badBlocks));
if(response.result.status != 'OK') {
throw new Error(`Error code: ${response.result.status}`);
}
}
public async getMinerData(): Promise<MinerData> {
const response = await this.callRpc(new GetMinerDataRequest());
return MinerData.parse(response.result);
}
public async AddAuxPoW(blockTemplateBlob: string, auxPoW: AuxPoW[]): Promise<AddedAuxPow> {
const response = await this.callRpc(new AddAuxPoWRequest(blockTemplateBlob, auxPoW));
return AddedAuxPow.parse(response.result);
}
public async setBootstrapDaemon(address: string, username: string = '', password: string = '', proxy: string = ''): Promise<void> {
const response = await this.callRpc(new SetBootstrapDaemonRequest(address, username, password, proxy));
if (typeof response.status == 'string' && response.status != 'OK') {
throw new Error(`Could not set bootstrap daemon: ${response.status}`);
}
}
public async saveBc(): Promise<void> {
const response = await this.callRpc(new SaveBcRequest());
if (typeof response.status == 'string' && response.status != 'OK') {
throw new Error(`Could not save blockchain: ${response.status}`);
}
}
public async getAltBlockHashes(): Promise<string[]> {
const response = await this.callRpc(new GetAltBlockHashesRequest());
return response.blks_hashes;
}
public async isKeyImageSpent(...keyImages: string[]): Promise<number[]> {
const response = await this.callRpc(new IsKeyImageSpentRequest(keyImages));
return response.spent_status;
}
public async sendRawTransaction(txAsHex: string, doNotRelay: boolean = false): Promise<TxInfo> {
const response = await this.callRpc(new SendRawTransactionRequest(txAsHex, doNotRelay));
return TxInfo.parse(response);
}
public async startMining(doBackgroundMining: boolean, ignoreBattery: boolean, minerAddress: string, threadsCount: number): Promise<void> {
const response = await this.callRpc(new StartMiningRequest(doBackgroundMining, ignoreBattery, minerAddress, threadsCount));
if (typeof response.status == 'string' && response.status != 'OK') {
throw new Error(`Could not start mining: ${response.status}`);
}
}
public async stopMining(): Promise<void> {
const response = await this.callRpc(new StopMiningRequest());
if (typeof response.status == 'string' && response.status != 'OK') {
throw new Error(`Could not stop mining: ${response.status}`);
}
}
public async miningStatus(): Promise<MiningStatus> {
const response = await this.callRpc(new MiningStatusRequest());
return MiningStatus.parse(response);
}
public async setLimit(limitDown: number, limitUp: number): Promise<{ limitDown: number, limitUp: number }> {
const response = await this.callRpc(new SetLimitRequest(limitDown, limitUp));
return {
limitDown: response.limit_down,
limitUp: response.limit_up
};
}
public async inPeers(inPeers: number): Promise<number> {
const response = await this.callRpc(new InPeersRequest(inPeers));
return response.in_peers;
}
public async outPeers(outPeers: number): Promise<number> {
const response = await this.callRpc(new OutPeersRequest(outPeers));
return response.out_peers;
}
public async getNetStats(): Promise<NetStats> {
const response = await this.callRpc(new GetNetStatsRequest());
return NetStats.parse(response);
}
public async getPublicNodes(whites: boolean = true, grays: boolean = false, includeBlocked: boolean = false): Promise<PublicNode[]> {
const response = await this.callRpc(new GetPublicNodesRequest(whites, grays, includeBlocked));
const _whites: any[] | undefined = response.whites;
const _grays: any[] | undefined = response.grays;
const nodes: PublicNode[] = [];
if (_whites) _whites.forEach((white) => nodes.push(PublicNode.parse(white, 'white')));
if (_grays) _grays.forEach((gray) => nodes.push(PublicNode.parse(gray, 'gray')));
return nodes;
}
public async getTransactionPoolHashes(): Promise<string[]> {
const response = await this.callRpc(new GetTransactionPoolHashesRequest());
return response.tx_hashes;
}
public async getTransactionPoolHashesBinary(): Promise<string> {
const response = await this.callRpc(new GetTransactionPoolHashesBinaryRequest());
return response.tx_hashes;
}
public async popBlocks(nBlocks: number): Promise<number> {
const response = await this.callRpc(new PopBlocksRequest(nBlocks));
return response.height;
}
public async update(command: 'check' | 'download', path: string = ''): Promise<UpdateInfo> {
const response = await this.callRpc(new UpdateRequest(command, path));
return UpdateInfo.parse(response);
}
public async checkUpdate(): Promise<UpdateInfo> {
return await this.update('check');
}
public async downloadUpdate(path: string = ''): Promise<UpdateInfo> {
return await this.update('download', path);
}
//#endregion
}

View file

@ -118,11 +118,15 @@ export class DaemonService {
if (this.electronService.isElectron) {
this.electronService.ipcRenderer.on('monero-close', (event, code: number | null) => {
console.log(event);
console.log(code);
this.onClose();
});
}
else if (wdw.electronAPI && wdw.electronAPI.onMoneroClose) {
wdw.electronAPI.onMoneroClose((event: any, code: number) => {
console.log(event);
console.log(code);
this.onClose();
});
}
@ -213,7 +217,7 @@ export class DaemonService {
return settings;
}
private raiseRpcError(error: { code: number, message: string }): void {
private raiseRpcError(error: RpcError): void {
if (error.code == -9) {
throw new CoreIsBusyError();
@ -254,7 +258,7 @@ export class DaemonService {
const response = await this.post(`${this.url}/${method}`, request.toDictionary());
if (response.error) {
this.raiseRpcError(response.error);
this.raiseRpcError(<RpcError>response.error);
}
return response;
@ -372,7 +376,7 @@ export class DaemonService {
const response = await this.callRpc(new GetBlockRequest(heightOrHash, fillPowHash));
if (response.error) {
this.raiseRpcError(response.error);
this.raiseRpcError(<RpcError>response.error);
}
return Block.parse(response.result);
@ -387,6 +391,10 @@ export class DaemonService {
public async getBlockHash(blockHeight: number): Promise<string> {
const response = await this.callRpc(new GetBlockHashRequest(blockHeight));
if (typeof response.result != 'string') {
throw new Error("Could not parse block hash");
}
return response.result;
}
@ -404,19 +412,19 @@ export class DaemonService {
throw new CoreIsBusyError();
}
throw new Error(response.result.status);
throw new Error(<string>response.result.status);
}
}
public async generateBlocks(amountOfBlocks: number, walletAddress: string, prevBlock: string = '', startingNonce: number): Promise<GeneratedBlocks> {
const response = await this.callRpc(new GenerateBlocksRequest(amountOfBlocks, walletAddress, prevBlock, startingNonce));
if(response.result && response.result.status != 'OK') {
if(response.result && typeof response.result.status == 'string' && response.result.status != 'OK') {
if (response.result.status == 'BUSY') {
throw new CoreIsBusyError();
}
throw new Error(response.result.status);
throw new Error(<string>response.result.status);
}
return GeneratedBlocks.parse(response.result);
@ -492,10 +500,6 @@ export class DaemonService {
public async getBans(): Promise<Ban[]> {
const response = await this.callRpc(new GetBansRequest());
if (response.error) {
this.raiseRpcError(response.error);
}
if (!response.result) {
return [];
}
@ -516,7 +520,10 @@ export class DaemonService {
throw new Error(`Error code: ${result.response}`);
}
return new Ban(address, 0, result.banned, result.seconds);
const banned: boolean = result.banned;
const seconds: number = result.seconds;
return new Ban(address, 0, banned, seconds);
}
public async flushTxPool(... txIds: string[]): Promise<void> {
@ -530,8 +537,8 @@ export class DaemonService {
public async getOuts(outputs: Output[], getTxId: boolean): Promise<OutKey[]> {
const response = await this.callRpc(new GetOutsRequest(outputs, getTxId));
if (response.error) {
this.raiseRpcError(response.error);
if (typeof response.status == 'string' && response.status != 'OK') {
throw new Error(response.status);
}
const _outkeys: any[] | undefined = response.outs;
@ -545,10 +552,6 @@ export class DaemonService {
public async getOutputHistogram(amounts: number[], minCount: number, maxCount: number, unlocked: boolean, recentCutoff: number): Promise<HistogramEntry[]> {
const response = await this.callRpc(new GetOutputHistogramRequest(amounts, minCount, maxCount, unlocked, recentCutoff));
if (response.error) {
this.raiseRpcError(response.error);
}
const entries: any[] = response.result.histogram;
const result: HistogramEntry[] = [];
@ -560,10 +563,6 @@ export class DaemonService {
public async getOutputDistribution(amounts: number[], cumulative: boolean, fromHeight: number, toHeight: number): Promise<OutputDistribution[]> {
const response = await this.callRpc(new GetOutputDistributionRequest(amounts, cumulative, fromHeight, toHeight));
if (response.error) {
this.raiseRpcError(response.error);
}
const entries: any[] = response.result.distributions;
const distributions: OutputDistribution[] = [];
@ -660,10 +659,6 @@ export class DaemonService {
public async getCoinbaseTxSum(height: number, count: number): Promise<CoinbaseTxSum> {
const response = await this.callRpc(new GetCoinbaseTxSumRequest(height, count));
if (response.error) {
this.raiseRpcError(response.error);
}
return CoinbaseTxSum.parse(response.result);
}
@ -682,14 +677,14 @@ export class DaemonService {
throw new Error(`Error code: ${response.status}`)
}
if (!response.bakclog && !response.result) {
if (!response.backlog && !response.result) {
return [];
}
if (response.backlog) {
if (response.backlog && typeof response.backlog == 'string') {
return TxBacklogEntry.fromBinary(response.backlog);
}
else if (response.result.backlog) return TxBacklogEntry.fromBinary(response.result.backlog);
else if (response.result.backlog && typeof response.result.backlog == 'string') return TxBacklogEntry.fromBinary(<string>response.result.backlog);
return [];
}
@ -703,6 +698,10 @@ export class DaemonService {
public async calculatePoWHash(majorVersion: number, height: number, blockBlob: string, seedHash: string): Promise<string> {
const response = await this.callRpc(new CalculatePoWHashRequest(majorVersion, height, blockBlob, seedHash));
if (typeof response.result != 'string') {
throw new Error("Unexpected result type")
}
return response.result;
}
@ -744,25 +743,48 @@ export class DaemonService {
public async getAltBlockHashes(): Promise<string[]> {
const response = await this.callRpc(new GetAltBlockHashesRequest());
const altBlockHashes: string[] = response.blks_hashes;
return response.blks_hashes;
if (!Array.isArray(altBlockHashes)) {
return [];
}
altBlockHashes.forEach((blockHash: string) => {
if(typeof blockHash != 'string') {
throw new Error("Could not parse alt block hashes");
}
})
return altBlockHashes;
}
public async isKeyImageSpent(...keyImages: string[]): Promise<number[]> {
const response = await this.callRpc(new IsKeyImageSpentRequest(keyImages));
if (response.status != 'OK') {
if (typeof response.status == 'string' && response.status != 'OK') {
throw new Error(response.status);
}
return response.spent_status;
const spentStatus: number[] = response.spent_status;
if (!Array.isArray(spentStatus)) {
throw new Error("Could not parse spent list result");
}
return spentStatus;
}
public async sendRawTransaction(txAsHex: string, doNotRelay: boolean = false): Promise<TxInfo> {
const response = await this.callRpc(new SendRawTransactionRequest(txAsHex, doNotRelay));
if (typeof response.status == 'string' && response.status != 'OK') {
throw new Error(response.reason);
if (typeof response.reason == 'string')
{
throw new Error(response.reason);
}
else {
throw new Error(response.status);
}
}
return TxInfo.parse(response);
@ -849,12 +871,20 @@ export class DaemonService {
public async inPeers(inPeers: number): Promise<number> {
const response = await this.callRpc(new InPeersRequest(inPeers));
if (typeof response.in_peers != 'number') {
throw new Error("Could not parse in peers count");
}
return response.in_peers;
}
public async outPeers(outPeers: number): Promise<number> {
const response = await this.callRpc(new OutPeersRequest(outPeers));
if (typeof response.out_peers != 'number') {
throw new Error("Could not parse out peers count");
}
return response.out_peers;
}
@ -867,7 +897,7 @@ export class DaemonService {
public async getPeerList(): Promise<PeerInfo[]> {
const response = await this.callRpc(new GetPeerListRequest());
if (response.status != 'OK') {
if (typeof response.status == 'string' && response.status != 'OK') {
throw new Error(response.status);
}
@ -897,7 +927,7 @@ export class DaemonService {
public async getTransactionPool(): Promise<TxPool> {
const response = await this.callRpc(new GetTransactionPoolRequest());
if (response.status != 'OK') {
if (typeof response.status == 'string' && response.status != 'OK') {
throw new Error(response.status);
}
@ -906,19 +936,32 @@ export class DaemonService {
public async getTransactionPoolHashes(): Promise<string[]> {
const response = await this.callRpc(new GetTransactionPoolHashesRequest());
const txHashes: string[] = response.tx_hashes;
return response.tx_hashes;
if (!Array.isArray(txHashes)) {
throw new Error("Could not parse txHashses");
}
return txHashes;
}
public async getTransactionPoolHashesBinary(): Promise<string> {
const response = await this.callRpc(new GetTransactionPoolHashesBinaryRequest());
if (typeof response.tx_hashes != 'string') {
throw new Error("Could not parse binary");
}
return response.tx_hashes;
}
public async popBlocks(nBlocks: number): Promise<number> {
const response = await this.callRpc(new PopBlocksRequest(nBlocks));
if (typeof response.height != 'number') {
throw new Error("");
}
return response.height;
}
@ -939,7 +982,7 @@ export class DaemonService {
public async setLogLevel(level: number): Promise<void> {
const response = await this.callRpc(new SetLogLevelRequest(level));
if (response.status != 'OK') {
if (typeof response.status == 'string' && response.status != 'OK') {
throw new Error(response.status);
}
}
@ -947,7 +990,7 @@ export class DaemonService {
public async setLogCategories(cateogories: string): Promise<void> {
const response = await this.callRpc(new SetLogCategoriesRequest(cateogories));
if (response.status != 'OK') {
if (typeof response.status == 'string' && response.status != 'OK') {
throw new Error(response.status);
}
}
@ -955,7 +998,7 @@ export class DaemonService {
public async setLogHashRate(visible: boolean): Promise<void> {
const response = await this.callRpc(new SetLogHashRateRequest(visible));
if (response.status != 'OK') {
if (typeof response.status == 'string' && response.status != 'OK') {
throw new Error(response.status);
}
}
@ -966,3 +1009,4 @@ export class DaemonService {
}
export interface RpcError { code: number, message: string }

View file

@ -71,15 +71,16 @@ export class BansComponent implements AfterViewInit {
public ngAfterViewInit(): void {
this.navbarService.setLinks(this.navbarLinks);
this.ngZone.run(() => {
this.ngZone.run(async () => {
const $table = $('#bansTable');
$table.bootstrapTable({});
$table.bootstrapTable('refreshOptions', {
classes: 'table table-bordered table-hover table-dark table-striped'
});
$table.bootstrapTable('showLoading');
this.refreshBansTable();
await this.refreshBansTable();
}).then().catch((error: any) => {
console.error(error);
});
}
@ -115,7 +116,7 @@ export class BansComponent implements AfterViewInit {
this.setBansError = '';
this.setBansSuccess = true;
}
catch (error) {
catch (error: any) {
console.error(error);
this.setBansSuccess = false;
this.setBansError = `${error}`;

View file

@ -14,13 +14,13 @@
<div *ngIf="daemonRunning && !daemonStopping" class="tab-content" id="pills-tabContent">
<div class="tab-pane fade show active" id="pills-last-block-header" role="tabpanel" aria-labelledby="pills-last-block-header-tab" tabindex="0">
<div *ngIf="getLastBlockError != ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<div *ngIf="getLastBlockError !== ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<h4><i class="bi bi-exclamation-triangle m-2"></i></h4>&nbsp;&nbsp;
<div>
{{getLastBlockError}}
</div>
</div>
<div *ngIf="getLastBlockError == ''" class="card p-1">
<div *ngIf="getLastBlockError === ''" class="card p-1">
<div class="card-header bg-primary text-white d-flex">
<h4>Block Header Details</h4>
</div>
@ -111,7 +111,7 @@
<div class="tab-pane fade" id="pills-get-block" role="tabpanel" aria-labelledby="pills-get-block-tab" tabindex="0">
<h4 class="mb-3">Get full block information by block height or hash</h4>
<br>
<div *ngIf="getBlockError != ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<div *ngIf="getBlockError !== ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<h4><i class="bi bi-exclamation-triangle m-2"></i></h4>&nbsp;&nbsp;
<div>
{{getBlockError}}
@ -393,14 +393,14 @@
<div class="tab-pane fade" id="pills-pop-blocks" role="tabpanel" aria-labelledby="pills-pop-blocks-tab" tabindex="0">
<h4 class="mb-3">Pop blockchain blocks</h4>
<div *ngIf="popBlocksError != ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<div *ngIf="popBlocksError !== ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<h4><i class="bi bi-exclamation-triangle m-2"></i></h4>&nbsp;&nbsp;
<div>
{{popBlocksError}}
</div>
</div>
<div *ngIf="popBlocksResult != undefined" class="alert alert-success d-flex align-items-center justify-content-center text-center" role="alert">
<div *ngIf="popBlocksResult !== undefined" class="alert alert-success d-flex align-items-center justify-content-center text-center" role="alert">
<h4><i class="bi bi-check-circle m-2"></i></h4>&nbsp;&nbsp;
<div>
New blockchain height: {{popBlocksResult}}
@ -437,7 +437,7 @@
</div>
</div>
<div *ngIf="pruneBlockchainError != ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<div *ngIf="pruneBlockchainError !== ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<h4><i class="bi bi-exclamation-triangle m-2"></i></h4>&nbsp;&nbsp;
<div>
{{pruneBlockchainError}}
@ -468,7 +468,7 @@
</div>
</div>
<div *ngIf="saveBlockchainError != ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<div *ngIf="saveBlockchainError !== ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<h4><i class="bi bi-exclamation-triangle m-2"></i></h4>&nbsp;&nbsp;
<div>
{{saveBlockchainError}}

View file

@ -66,7 +66,9 @@ export class BlockchainComponent implements AfterViewInit {
ngAfterViewInit(): void {
this.navbarService.setLinks(this.navbarLinks);
this.load();
this.load().then().catch((error: any) => {
console.error(error);
});
}
public async load(): Promise<void> {
@ -79,7 +81,7 @@ export class BlockchainComponent implements AfterViewInit {
this.lastBlockHeader = await this.daemonService.getLastBlockHeader(true);
this.getLastBlockError = '';
}
catch(error) {
catch(error: any) {
console.error(error);
this.getLastBlockError = `${error}`;
}
@ -92,7 +94,7 @@ export class BlockchainComponent implements AfterViewInit {
this.block = await this.daemonService.getBlock(this.getBlockByHash ? this.getBlockHash : this.getBlockHeight, this.fillPoWHash);
this.getBlockError = '';
}
catch(error) {
catch(error: any) {
console.error(error);
this.getBlockError = `${error}`;
}
@ -113,7 +115,7 @@ export class BlockchainComponent implements AfterViewInit {
}
this.getBlockHeaderError = '';
} catch (error) {
} catch (error: any) {
console.error(error);
this.getBlockHeaderError = `${error}`;
}
@ -127,7 +129,7 @@ export class BlockchainComponent implements AfterViewInit {
this.popBlocksResult = await this.daemonService.popBlocks(this.popBlocksNBlocks);
this.popBlocksError = '';
}
catch(error) {
catch(error: any) {
console.error(error);
this.popBlocksResult = undefined;
this.popBlocksError = `${error}`;
@ -142,7 +144,7 @@ export class BlockchainComponent implements AfterViewInit {
await this.daemonService.saveBc();
this.blockchainSaved = true;
}
catch(error) {
catch(error: any) {
console.error(error);
this.blockchainSaved = false;
this.saveBlockchainError = `${error}`;
@ -157,7 +159,7 @@ export class BlockchainComponent implements AfterViewInit {
try {
await this.daemonService.pruneBlockchain(false);
this.blockchainPruned = true;
} catch(error) {
} catch(error: any) {
this.pruneBlockchainError = `${error}`;
this.blockchainPruned = false;
}

View file

@ -60,6 +60,8 @@ export class HardForkInfoComponent implements AfterViewInit {
private onNavigationEnd(): void {
this.load().then(() => {
this.cards = this.createCards();
}).catch((error: any) => {
console.error(error);
});
}

View file

@ -13,7 +13,7 @@
<div class="tab-content" id="pills-tabContent">
<div class="tab-pane fade show active" id="pills-overview" role="tabpanel" aria-labelledby="pills-overview-tab" tabindex="0">
<div *ngIf="lines.length == 0" class="h-100 p-5 text-bg-dark rounded-3 m-4 text-center">
<div *ngIf="lines.length === 0" class="h-100 p-5 text-bg-dark rounded-3 m-4 text-center">
<h2><i class="bi bi-exclamation-diamond m-4"></i> No logs</h2>
<p>Start monero daemon to enable session logging</p>
</div>
@ -28,7 +28,7 @@
</div>
<div class="tab-pane fade" id="pills-set-log-level" role="tabpanel" aria-labelledby="pills-set-log-level-tab" tabindex="0">
<div *ngIf="setLogLevelError != ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<div *ngIf="setLogLevelError !== ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<h4><i class="bi bi-exclamation-triangle m-2"></i></h4>&nbsp;&nbsp;
<div>
{{setLogLevelError}}
@ -49,11 +49,11 @@
<div class="col-md-4">
<label for="set-log-level-level" class="form-label">Log Level</label>
<select class="form-select" id="set-log-level-level" [(ngModel)]="setLogLevelLevel" [ngModelOptions]="{standalone: true}">
<option [ngValue]="0" [selected]="setLogLevelLevel == 0">0</option>
<option [ngValue]="1" [selected]="setLogLevelLevel == 1">1</option>
<option [ngValue]="2" [selected]="setLogLevelLevel == 2">2</option>
<option [ngValue]="3" [selected]="setLogLevelLevel == 3">3</option>
<option [ngValue]="4" [selected]="setLogLevelLevel == 4">4</option>
<option [ngValue]="0" [selected]="setLogLevelLevel === 0">0</option>
<option [ngValue]="1" [selected]="setLogLevelLevel === 1">1</option>
<option [ngValue]="2" [selected]="setLogLevelLevel === 2">2</option>
<option [ngValue]="3" [selected]="setLogLevelLevel === 3">3</option>
<option [ngValue]="4" [selected]="setLogLevelLevel === 4">4</option>
</select>
</div>
</div>
@ -67,7 +67,7 @@
</div>
<div class="tab-pane fade" id="pills-set-log-categories" role="tabpanel" aria-labelledby="pills-set-log-categories-tab" tabindex="0">
<div *ngIf="setLogLevelError != ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<div *ngIf="setLogLevelError !== ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<h4><i class="bi bi-exclamation-triangle m-2"></i></h4>&nbsp;&nbsp;
<div>
{{setLogCategoriesError}}
@ -89,52 +89,52 @@
<div class="col-md-4">
<label for="set-log-categories-default" class="form-label">Default</label>
<select class="form-select" id="set-log-categories-default" [(ngModel)]="setLogCategoriesCategories.default" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.default == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.default == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.default == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.default == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.default == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.default == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.default == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.default === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.default === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.default === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.default === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.default === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.default === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.default === 'TRACE'">Trace</option>
</select>
</div>
<div class="col-md-4">
<label for="set-log-categories-all" class="form-label">All</label>
<select class="form-select" id="set-log-categories-all" [(ngModel)]="setLogCategoriesCategories.all" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.all == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.all == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.all == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.all == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.all == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.all == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.all == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.all === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.all === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.all === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.all === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.all === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.all === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.all === 'TRACE'">Trace</option>
</select>
</div>
<div class="col-md-4">
<label for="set-log-categories-bcutil" class="form-label">Bcutil</label>
<select class="form-select" id="set-log-categories-bcutil" [(ngModel)]="setLogCategoriesCategories.bcutil" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.bcutil == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.bcutil == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.bcutil == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.bcutil == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.bcutil == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.bcutil == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.bcutil == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.bcutil === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.bcutil === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.bcutil === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.bcutil === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.bcutil === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.bcutil === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.bcutil === 'TRACE'">Trace</option>
</select>
</div>
<div class="col-md-4">
<label for="set-log-categories-checkpoints" class="form-label">Checkpoints</label>
<select class="form-select" id="set-log-categories-checkpoints" [(ngModel)]="setLogCategoriesCategories.checkpoints" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.checkpoints == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.checkpoints == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.checkpoints == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.checkpoints == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.checkpoints == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.checkpoints == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.checkpoints == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.checkpoints === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.checkpoints === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.checkpoints === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.checkpoints === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.checkpoints === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.checkpoints === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.checkpoints === 'TRACE'">Trace</option>
</select>
</div>
@ -142,13 +142,13 @@
<div class="col-md-4">
<label for="set-log-categories-i18n" class="form-label">i18n</label>
<select class="form-select" id="set-log-categories-i18n" [(ngModel)]="setLogCategoriesCategories.i18n" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.i18n == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.i18n == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.i18n == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.i18n == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.i18n == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.i18n == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.i18n == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.i18n === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.i18n === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.i18n === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.i18n === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.i18n === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.i18n === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.i18n === 'TRACE'">Trace</option>
</select>
</div>
@ -156,13 +156,13 @@
<div class="col-md-4">
<label for="set-log-categories-perf" class="form-label">Perf</label>
<select class="form-select" id="set-log-categories-perf" [(ngModel)]="setLogCategoriesCategories.perf" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.perf == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.perf == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.perf == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.perf == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.perf == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.perf == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.perf == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.perf === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.perf === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.perf === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.perf === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.perf === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.perf === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.perf === 'TRACE'">Trace</option>
</select>
</div>
@ -170,13 +170,13 @@
<div class="col-md-4">
<label for="set-log-categories-stacktrace" class="form-label">Stacktrace</label>
<select class="form-select" id="set-log-categories-stacktrace" [(ngModel)]="setLogCategoriesCategories.stacktrace" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.stacktrace == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.stacktrace == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.stacktrace == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.stacktrace == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.stacktrace == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.stacktrace == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.stacktrace == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.stacktrace === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.stacktrace === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.stacktrace === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.stacktrace === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.stacktrace === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.stacktrace === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.stacktrace === 'TRACE'">Trace</option>
</select>
</div>
@ -184,13 +184,13 @@
<div class="col-md-4">
<label for="set-log-categories-account" class="form-label">Account</label>
<select class="form-select" id="set-log-categories-account" [(ngModel)]="setLogCategoriesCategories.account" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.account == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.account == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.account == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.account == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.account == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.account == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.account == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.account === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.account === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.account === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.account === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.account === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.account === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.account === 'TRACE'">Trace</option>
</select>
</div>
@ -198,13 +198,13 @@
<div class="col-md-4">
<label for="set-log-categories-difficulty" class="form-label">Difficulty</label>
<select class="form-select" id="set-log-categories-difficulty" [(ngModel)]="setLogCategoriesCategories.difficulty" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.difficulty == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.difficulty == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.difficulty == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.difficulty == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.difficulty == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.difficulty == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.difficulty == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.difficulty === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.difficulty === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.difficulty === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.difficulty === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.difficulty === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.difficulty === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.difficulty === 'TRACE'">Trace</option>
</select>
</div>
@ -212,26 +212,26 @@
<div class="col-md-4">
<label for="set-log-categories-hardfork" class="form-label">Hard Fork</label>
<select class="form-select" id="set-log-categories-hardfork" [(ngModel)]="setLogCategoriesCategories.hardfork" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.hardfork == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.hardfork == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.hardfork == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.hardfork == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.hardfork == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.hardfork == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.hardfork == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.hardfork === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.hardfork === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.hardfork === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.hardfork === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.hardfork === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.hardfork === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.hardfork === 'TRACE'">Trace</option>
</select>
</div>
<div class="col-md-4">
<label for="set-log-categories-miner" class="form-label">Miner</label>
<select class="form-select" id="set-log-categories-miner" [(ngModel)]="setLogCategoriesCategories.miner" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.miner == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.miner == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.miner == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.miner == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.miner == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.miner == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.miner == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.miner === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.miner === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.miner === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.miner === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.miner === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.miner === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.miner === 'TRACE'">Trace</option>
</select>
</div>
@ -239,13 +239,13 @@
<div class="col-md-4">
<label for="set-log-categories-txpool" class="form-label">Txpool</label>
<select class="form-select" id="set-log-categories-txpool" [(ngModel)]="setLogCategoriesCategories.txpool" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.txpool == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.txpool == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.txpool == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.txpool == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.txpool == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.txpool == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.txpool == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.txpool === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.txpool === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.txpool === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.txpool === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.txpool === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.txpool === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.txpool === 'TRACE'">Trace</option>
</select>
</div>
@ -254,13 +254,13 @@
<div class="col-md-4">
<label for="set-log-categories-device-ledger" class="form-label">Device Ledger</label>
<select class="form-select" id="set-log-categories-device-ledger" [(ngModel)]="setLogCategoriesCategories.deviceLedger" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.deviceLedger == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.deviceLedger == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.deviceLedger == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.deviceLedger == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.deviceLedger == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.deviceLedger == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.deviceLedger == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.deviceLedger === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.deviceLedger === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.deviceLedger === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.deviceLedger === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.deviceLedger === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.deviceLedger === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.deviceLedger === 'TRACE'">Trace</option>
</select>
</div>
@ -269,13 +269,13 @@
<div class="col-md-4">
<label for="set-log-categories-tests-core" class="form-label">Tests Core</label>
<select class="form-select" id="set-log-categories-tests-core" [(ngModel)]="setLogCategoriesCategories.testsCore" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.testsCore == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.testsCore == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.testsCore == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.testsCore == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.testsCore == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.testsCore == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.testsCore == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.testsCore === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.testsCore === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.testsCore === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.testsCore === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.testsCore === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.testsCore === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.testsCore === 'TRACE'">Trace</option>
</select>
</div>
@ -284,13 +284,13 @@
<div class="col-md-4">
<label for="set-log-categories-multisig" class="form-label">Multisig</label>
<select class="form-select" id="set-log-categories-tests-core" [(ngModel)]="setLogCategoriesCategories.multisig" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.multisig == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.multisig == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.multisig == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.multisig == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.multisig == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.multisig == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.multisig == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.multisig === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.multisig === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.multisig === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.multisig === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.multisig === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.multisig === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.multisig === 'TRACE'">Trace</option>
</select>
</div>
@ -300,13 +300,13 @@
<div class="col-md-4">
<label for="set-log-categories-bulletproofs" class="form-label">Bulletproofs</label>
<select class="form-select" id="set-log-categories-bulletproofs" [(ngModel)]="setLogCategoriesCategories.bulletproofs" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.bulletproofs == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.bulletproofs == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.bulletproofs == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.bulletproofs == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.bulletproofs == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.bulletproofs == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.bulletproofs == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.bulletproofs === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.bulletproofs === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.bulletproofs === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.bulletproofs === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.bulletproofs === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.bulletproofs === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.bulletproofs === 'TRACE'">Trace</option>
</select>
</div>
@ -315,13 +315,13 @@
<div class="col-md-4">
<label for="set-log-categories-ringct" class="form-label">Ringct</label>
<select class="form-select" id="set-log-categories-ringct" [(ngModel)]="setLogCategoriesCategories.ringct" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.ringct == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.ringct == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.ringct == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.ringct == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.ringct == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.ringct == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.ringct == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.ringct === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.ringct === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.ringct === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.ringct === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.ringct === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.ringct === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.ringct === 'TRACE'">Trace</option>
</select>
</div>
@ -331,13 +331,13 @@
<div class="col-md-4">
<label for="set-log-categories-logging" class="form-label">Logging</label>
<select class="form-select" id="set-log-categories-logging" [(ngModel)]="setLogCategoriesCategories.logging" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.logging == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.logging == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.logging == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.logging == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.logging == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.logging == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.logging == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.logging === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.logging === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.logging === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.logging === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.logging === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.logging === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.logging === 'TRACE'">Trace</option>
</select>
</div>
@ -346,13 +346,13 @@
<div class="col-md-4">
<label for="set-log-categories-global" class="form-label">Global</label>
<select class="form-select" id="set-log-categories-global" [(ngModel)]="setLogCategoriesCategories.global" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.global == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.global == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.global == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.global == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.global == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.global == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.global == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.global === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.global === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.global === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.global === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.global === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.global === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.global === 'TRACE'">Trace</option>
</select>
</div>
@ -361,13 +361,13 @@
<div class="col-md-4">
<label for="set-log-categories-verify" class="form-label">Verify</label>
<select class="form-select" id="set-log-categories-verify" [(ngModel)]="setLogCategoriesCategories.verify" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.verify == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.verify == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.verify == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.verify == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.verify == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.verify == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.verify == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.verify === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.verify === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.verify === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.verify === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.verify === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.verify === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.verify === 'TRACE'">Trace</option>
</select>
</div>
@ -375,13 +375,13 @@
<div class="col-md-4">
<label for="set-log-categories-msgwriter" class="form-label">Msgwriter</label>
<select class="form-select" id="set-log-categories-msgwriter" [(ngModel)]="setLogCategoriesCategories.msgwriter" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.msgwriter == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.msgwriter == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.msgwriter == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.msgwriter == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.msgwriter == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.msgwriter == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.msgwriter == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.msgwriter === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.msgwriter === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.msgwriter === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.msgwriter === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.msgwriter === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.msgwriter === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.msgwriter === 'TRACE'">Trace</option>
</select>
</div>
</div>
@ -395,26 +395,26 @@
<div class="col-md-4">
<label for="set-log-categories-daemon" class="form-label">Daemon</label>
<select class="form-select" id="set-log-categories-daemon" [(ngModel)]="setLogCategoriesCategories.daemon" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.daemon == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.daemon == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.daemon == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.daemon == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.daemon == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.daemon == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.daemon == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.daemon === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.daemon === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.daemon === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.daemon === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.daemon === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.daemon === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.daemon === 'TRACE'">Trace</option>
</select>
</div>
<div class="col-md-4">
<label for="set-log-categories-net-blockchain-daemon-rpc" class="form-label">Daemon RPC</label>
<select class="form-select" id="set-log-categories-blockchain-daemon-rpc" [(ngModel)]="setLogCategoriesCategories.daemonRpc" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.daemonRpc == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.daemonRpc == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.daemonRpc == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.daemonRpc == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.daemonRpc == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.daemonRpc == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.daemonRpc == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.daemonRpc === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.daemonRpc === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.daemonRpc === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.daemonRpc === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.daemonRpc === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.daemonRpc === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.daemonRpc === 'TRACE'">Trace</option>
</select>
</div>
@ -428,26 +428,26 @@
<div class="col-md-4">
<label for="set-log-categories-cn" class="form-label">Cn</label>
<select class="form-select" id="set-log-categories-cn" [(ngModel)]="setLogCategoriesCategories.cn" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.cn == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.cn == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.cn == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.cn == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.cn == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.cn == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.cn == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.cn === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.cn === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.cn === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.cn === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.cn === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.cn === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.cn === 'TRACE'">Trace</option>
</select>
</div>
<div class="col-md-4">
<label for="set-log-categories-net-blockchain-cn-clock-queue" class="form-label">Cn Block Queue</label>
<select class="form-select" id="set-log-categories-blockchain-cn-clock-queue" [(ngModel)]="setLogCategoriesCategories.cnBlockQueue" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.cnBlockQueue == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.cnBlockQueue == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.cnBlockQueue == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.cnBlockQueue == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.cnBlockQueue == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.cnBlockQueue == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.cnBlockQueue == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.cnBlockQueue === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.cnBlockQueue === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.cnBlockQueue === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.cnBlockQueue === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.cnBlockQueue === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.cnBlockQueue === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.cnBlockQueue === 'TRACE'">Trace</option>
</select>
</div>
@ -462,91 +462,91 @@
<div class="col-md-4">
<label for="set-log-categories-net" class="form-label">Net</label>
<select class="form-select" id="set-log-categories-net" [(ngModel)]="setLogCategoriesCategories.net" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.net == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.net == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.net == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.net == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.net == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.net == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.net == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.net === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.net === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.net === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.net === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.net === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.net === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.net === 'TRACE'">Trace</option>
</select>
</div>
<div class="col-md-4">
<label for="set-log-categories-net-http" class="form-label">NetHttp</label>
<select class="form-select" id="set-log-categories-net-http" [(ngModel)]="setLogCategoriesCategories.netHttp" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.netHttp == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.netHttp == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.netHttp == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.netHttp == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.netHttp == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.netHttp == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.netHttp == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.netHttp === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.netHttp === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.netHttp === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.netHttp === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.netHttp === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.netHttp === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.netHttp === 'TRACE'">Trace</option>
</select>
</div>
<div class="col-md-4">
<label for="set-log-categories-net-p2p" class="form-label">NetP2P</label>
<select class="form-select" id="set-log-categories-net-p2p" [(ngModel)]="setLogCategoriesCategories.netP2p" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.netP2p == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.netP2p == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.netP2p == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.netP2p == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.netP2p == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.netP2p == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.netP2p == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.netP2p === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.netP2p === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.netP2p === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.netP2p === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.netP2p === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.netP2p === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.netP2p === 'TRACE'">Trace</option>
</select>
</div>
<div class="col-md-4">
<label for="set-log-categories-net-throttle" class="form-label">NetThrottle</label>
<select class="form-select" id="set-log-categories-net-throttle" [(ngModel)]="setLogCategoriesCategories.netThrottle" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.netThrottle == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.netThrottle == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.netThrottle == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.netThrottle == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.netThrottle == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.netThrottle == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.netThrottle == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.netThrottle === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.netThrottle === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.netThrottle === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.netThrottle === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.netThrottle === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.netThrottle === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.netThrottle === 'TRACE'">Trace</option>
</select>
</div>
<div class="col-md-4">
<label for="set-log-categories-net-dns" class="form-label">NetDNS</label>
<select class="form-select" id="set-log-categories-net-dns" [(ngModel)]="setLogCategoriesCategories.netDns" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.netDns == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.netDns == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.netDns == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.netDns == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.netDns == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.netDns == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.netDns == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.netDns === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.netDns === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.netDns === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.netDns === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.netDns === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.netDns === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.netDns === 'TRACE'">Trace</option>
</select>
</div>
<div class="col-md-4">
<label for="set-log-categories-net-dl" class="form-label">NetDl</label>
<select class="form-select" id="set-log-categories-net-dl" [(ngModel)]="setLogCategoriesCategories.netDl" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.netDl == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.netDl == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.netDl == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.netDl == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.netDl == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.netDl == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.netDl == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.netDl === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.netDl === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.netDl === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.netDl === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.netDl === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.netDl === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.netDl === 'TRACE'">Trace</option>
</select>
</div>
<div class="col-md-4">
<label for="set-log-categories-net-cn" class="form-label">NetCn</label>
<select class="form-select" id="set-log-categories-net-cn" [(ngModel)]="setLogCategoriesCategories.netCn" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.netCn == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.netCn == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.netCn == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.netCn == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.netCn == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.netCn == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.netCn == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.netCn === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.netCn === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.netCn === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.netCn === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.netCn === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.netCn === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.netCn === 'TRACE'">Trace</option>
</select>
</div>
@ -561,39 +561,39 @@
<div class="col-md-4">
<label for="set-log-categories-net-blockchain" class="form-label">Blockchain</label>
<select class="form-select" id="set-log-categories-blockchain" [(ngModel)]="setLogCategoriesCategories.blockchain" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.blockchain == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.blockchain == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.blockchain == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.blockchain == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.blockchain == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.blockchain == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.blockchain == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.blockchain === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.blockchain === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.blockchain === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.blockchain === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.blockchain === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.blockchain === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.blockchain === 'TRACE'">Trace</option>
</select>
</div>
<div class="col-md-4">
<label for="set-log-categories-net-blockchain-db" class="form-label">Blockchain DB</label>
<select class="form-select" id="set-log-categories-blockchain-db" [(ngModel)]="setLogCategoriesCategories.blockchainDb" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.blockchainDb == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.blockchainDb == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.blockchainDb == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.blockchainDb == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.blockchainDb == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.blockchainDb == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.blockchainDb == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.blockchainDb === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.blockchainDb === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.blockchainDb === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.blockchainDb === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.blockchainDb === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.blockchainDb === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.blockchainDb === 'TRACE'">Trace</option>
</select>
</div>
<div class="col-md-4">
<label for="set-log-categories-net-blockchain-db-lmdb" class="form-label">Blockchain DB LMDB</label>
<select class="form-select" id="set-log-categories-blockchain-db-lmdb" [(ngModel)]="setLogCategoriesCategories.blockchainDbLmdb" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.blockchainDbLmdb == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.blockchainDbLmdb == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.blockchainDbLmdb == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.blockchainDbLmdb == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.blockchainDbLmdb == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.blockchainDbLmdb == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.blockchainDbLmdb == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.blockchainDbLmdb === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.blockchainDbLmdb === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.blockchainDbLmdb === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.blockchainDbLmdb === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.blockchainDbLmdb === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.blockchainDbLmdb === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.blockchainDbLmdb === 'TRACE'">Trace</option>
</select>
</div>
@ -607,52 +607,52 @@
<div class="col-md-4">
<label for="set-log-categories-wallet-gen-multisig" class="form-label">Wallet Gen Multisig</label>
<select class="form-select" id="set-log-categories-wallet-gen-multisig" [(ngModel)]="setLogCategoriesCategories.walletGenMultisig" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.walletGenMultisig == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.walletGenMultisig == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.walletGenMultisig == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.walletGenMultisig == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.walletGenMultisig == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.walletGenMultisig == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.walletGenMultisig == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.walletGenMultisig === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.walletGenMultisig === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.walletGenMultisig === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.walletGenMultisig === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.walletGenMultisig === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.walletGenMultisig === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.walletGenMultisig === 'TRACE'">Trace</option>
</select>
</div>
<div class="col-md-4">
<label for="set-log-categories-wallet-simple-wallet" class="form-label">Wallet Simple Wallet</label>
<select class="form-select" id="set-log-categories-wallet-simple-wallet" [(ngModel)]="setLogCategoriesCategories.walletSimpleWallet" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.walletSimpleWallet == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.walletSimpleWallet == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.walletSimpleWallet == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.walletSimpleWallet == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.walletSimpleWallet == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.walletSimpleWallet == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.walletSimpleWallet == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.walletSimpleWallet === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.walletSimpleWallet === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.walletSimpleWallet === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.walletSimpleWallet === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.walletSimpleWallet === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.walletSimpleWallet === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.walletSimpleWallet === 'TRACE'">Trace</option>
</select>
</div>
<div class="col-md-4">
<label for="set-log-categories-wallet-api" class="form-label">Wallet API</label>
<select class="form-select" id="set-log-categories-wallet-api" [(ngModel)]="setLogCategoriesCategories.walletAPI" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.walletAPI == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.walletAPI == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.walletAPI == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.walletAPI == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.walletAPI == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.walletAPI == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.walletAPI == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.walletAPI === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.walletAPI === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.walletAPI === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.walletAPI === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.walletAPI === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.walletAPI === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.walletAPI === 'TRACE'">Trace</option>
</select>
</div>
<div class="col-md-4">
<label for="set-log-categories-wallet-ring-db" class="form-label">Wallet Ring DB</label>
<select class="form-select" id="set-log-categories-wallet-ring-db" [(ngModel)]="setLogCategoriesCategories.walletRingDb" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.walletRingDb == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.walletRingDb == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.walletRingDb == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.walletRingDb == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.walletRingDb == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.walletRingDb == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.walletRingDb == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.walletRingDb === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.walletRingDb === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.walletRingDb === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.walletRingDb === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.walletRingDb === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.walletRingDb === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.walletRingDb === 'TRACE'">Trace</option>
</select>
</div>
@ -660,26 +660,26 @@
<div class="col-md-4">
<label for="set-log-categories-wallet-wallet2" class="form-label">Wallet Wallet2</label>
<select class="form-select" id="set-log-categories-wallet-wallet2" [(ngModel)]="setLogCategoriesCategories.walletWallet2" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.walletWallet2 == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.walletWallet2 == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.walletWallet2 == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.walletWallet2 == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.walletWallet2 == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.walletWallet2 == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.walletWallet2 == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.walletWallet2 === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.walletWallet2 === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.walletWallet2 === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.walletWallet2 === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.walletWallet2 === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.walletWallet2 === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.walletWallet2 === 'TRACE'">Trace</option>
</select>
</div>
<div class="col-md-4">
<label for="set-log-categories-wallet-rpc" class="form-label">Wallet RPC</label>
<select class="form-select" id="set-log-categories-wallet-rpc" [(ngModel)]="setLogCategoriesCategories.walletRpc" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.walletRpc == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.walletRpc == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.walletRpc == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.walletRpc == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.walletRpc == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.walletRpc == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.walletRpc == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.walletRpc === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.walletRpc === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.walletRpc === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.walletRpc === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.walletRpc === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.walletRpc === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.walletRpc === 'TRACE'">Trace</option>
</select>
</div>
@ -695,26 +695,26 @@
<div class="col-md-4">
<label for="set-log-categories-debug-tools-deserialize" class="form-label">Debug Tools Deserialize</label>
<select class="form-select" id="set-log-categories-debug-tools-deserialize" [(ngModel)]="setLogCategoriesCategories.debugToolsDeserialize" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.debugToolsDeserialize == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.debugToolsDeserialize == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.debugToolsDeserialize == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.debugToolsDeserialize == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.debugToolsDeserialize == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.debugToolsDeserialize == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.debugToolsDeserialize == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.debugToolsDeserialize === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.debugToolsDeserialize === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.debugToolsDeserialize === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.debugToolsDeserialize === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.debugToolsDeserialize === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.debugToolsDeserialize === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.debugToolsDeserialize === 'TRACE'">Trace</option>
</select>
</div>
<div class="col-md-4">
<label for="set-log-categories-debug-tools-object-sizes" class="form-label">Debug Tools Object Sizes</label>
<select class="form-select" id="set-log-categories-debug-tools-object-sizes" [(ngModel)]="setLogCategoriesCategories.debugToolsObjectSizes" [ngModelOptions]="{standalone: true}">
<option [ngValue]="''" [selected]="setLogCategoriesCategories.debugToolsObjectSizes == ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.debugToolsObjectSizes == 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.debugToolsObjectSizes == 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.debugToolsObjectSizes == 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.debugToolsObjectSizes == 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.debugToolsObjectSizes == 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.debugToolsObjectSizes == 'TRACE'">Trace</option>
<option [ngValue]="''" [selected]="setLogCategoriesCategories.debugToolsObjectSizes === ''">Disabled</option>
<option [ngValue]="'FATAL'" [selected]="setLogCategoriesCategories.debugToolsObjectSizes === 'FATAL'">Fatal</option>
<option [ngValue]="'ERROR'" [selected]="setLogCategoriesCategories.debugToolsObjectSizes === 'ERROR'">Error</option>
<option [ngValue]="'WARNING'" [selected]="setLogCategoriesCategories.debugToolsObjectSizes === 'WARNING'">Warning</option>
<option [ngValue]="'INFO'" [selected]="setLogCategoriesCategories.debugToolsObjectSizes === 'INFO'">Info</option>
<option [ngValue]="'DEBUG'" [selected]="setLogCategoriesCategories.debugToolsObjectSizes === 'DEBUG'">Debug</option>
<option [ngValue]="'TRACE'" [selected]="setLogCategoriesCategories.debugToolsObjectSizes === 'TRACE'">Trace</option>
</select>
</div>
@ -731,7 +731,7 @@
</div>
<div class="tab-pane fade" id="pills-set-log-hash-rate" role="tabpanel" aria-labelledby="pills-set-log-hash-rate-tab" tabindex="0">
<div *ngIf="setLogHashRateError != ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<div *ngIf="setLogHashRateError !== ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<h4><i class="bi bi-exclamation-triangle m-2"></i></h4>&nbsp;&nbsp;
<div>
{{setLogHashRateError}}

View file

@ -35,7 +35,10 @@ export class LogsComponent implements AfterViewInit {
public setLogHashRateSuccess: boolean = false;
constructor(private navbarService: NavbarService, private logsService: LogsService, private daemonService: DaemonService, private ngZone: NgZone) {
this.logsService.onLog.subscribe((message: string) => this.onLog());
this.logsService.onLog.subscribe((message: string) => {
console.debug(message);
this.onLog()
});
this.navbarLinks = [
new NavbarLink('pills-overview-tab', '#pills-overview', 'pills-overview', false, 'Overview'),
new NavbarLink('pills-set-log-level-tab', '#pills-set-log-level', 'pills-set-log-level', false, 'Set Log Level'),
@ -69,6 +72,7 @@ export class LogsComponent implements AfterViewInit {
}
public trackByFn(index: number, item: string): number {
console.debug(`trackByFn(index: ${index}, ${item})`);
return index; // usa l'indice per tracciare gli elementi
}
@ -88,7 +92,7 @@ export class LogsComponent implements AfterViewInit {
this.setLogLevelError = '';
this.setLogLevelSuccess = true;
} catch (error) {
} catch (error: any) {
this.setLogLevelSuccess = false;
this.setLogLevelError = `${error}`;
@ -105,7 +109,7 @@ export class LogsComponent implements AfterViewInit {
await this.daemonService.setLogHashRate(this.setLogHashRateEnabled);
this.setLogHashRateError = '';
this.setLogHashRateSuccess = true;
} catch(error) {
} catch(error: any) {
console.error(error);
this.setLogHashRateError = `${error}`;
this.setLogHashRateSuccess = false;
@ -126,7 +130,7 @@ export class LogsComponent implements AfterViewInit {
this.setLogCategoriesError = ``;
this.setLogCategoriesSuccess = true;
}
catch(error) {
catch(error: any) {
this.setLogCategoriesError = `${error}`;
this.setLogCategoriesSuccess = false;
}

View file

@ -1,5 +1,4 @@
import { EventEmitter, Injectable, NgZone } from '@angular/core';
import { ipcRenderer, webFrame } from 'electron';
import { ElectronService } from '../../core/services';
import { LogCategories } from '../../../common';
@ -10,7 +9,6 @@ export class LogsService {
public readonly onLog: EventEmitter<string> = new EventEmitter<string>();
public readonly lines: string[] = [];
public readonly categories: LogCategories = new LogCategories();
private readonly ansiRegex: RegExp = /\u001b\[[0-9;]*m/g;
constructor(private electronService: ElectronService, private ngZone: NgZone) {
const wdw = (window as any);
@ -27,7 +25,8 @@ export class LogsService {
}
public cleanLog(message: string): string {
return message.replace(this.ansiRegex, '').replace(/[\r\n]+/g, '\n').trim();
//return message.replace(/\u001b\[[0-9;]*m/g, '').replace(/[\r\n]+/g, '\n').trim();
return message.replace(/[\r\n]+/g, '\n').trim();
}
public log(message: string): void {

View file

@ -186,7 +186,7 @@
<div class="tab-pane fade" id="pills-block-template" role="tabpanel" aria-labelledby="pills-block-template-tab" tabindex="0">
<h4 class="mb-3">Get a block template on which mining a new block</h4>
<div *ngIf="getBlockTemplateError != ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<div *ngIf="getBlockTemplateError !== ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<h4><i class="bi bi-exclamation-triangle m-2"></i></h4>&nbsp;&nbsp;
<div>
{{ getBlockTemplateError }}
@ -218,13 +218,13 @@
</div>
<div class="tab-pane fade" id="pills-calc-pow" role="tabpanel" aria-labelledby="pills-calc-pow-tab" tabindex="0">
<div *ngIf="calcPowError != ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<div *ngIf="calcPowError !== ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<h4><i class="bi bi-exclamation-triangle m-2"></i></h4>&nbsp;&nbsp;
<div>
{{ calcPowError }}
</div>
</div>
<div *ngIf="calculatedPowHash != ''" class="alert alert-success d-flex align-items-center justify-content-center text-center" role="alert">
<div *ngIf="calculatedPowHash !== ''" class="alert alert-success d-flex align-items-center justify-content-center text-center" role="alert">
<h4><i class="bi bi-check-circle m-2"></i></h4>&nbsp;&nbsp;
<div>
Calculated PoW Hash: {{ calculatedPowHash }}
@ -270,7 +270,7 @@
</div>
<div class="tab-pane fade" id="pills-add-aux-pow" role="tabpanel" aria-labelledby="pills-add-aux-pow-tab" tabindex="0">
<div *ngIf="addAuxPowError != ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<div *ngIf="addAuxPowError !== ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<h4><i class="bi bi-exclamation-triangle m-2"></i></h4>&nbsp;&nbsp;
<div>
{{ addAuxPowError }}
@ -330,7 +330,7 @@
</div>
<div class="tab-pane fade" id="pills-submit-block" role="tabpanel" aria-labelledby="pills-submit-block-tab" tabindex="0">
<div *ngIf="submitBlockError != ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<div *ngIf="submitBlockError !== ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<h4><i class="bi bi-exclamation-triangle m-2"></i></h4>&nbsp;&nbsp;
<div>
{{ submitBlockError }}
@ -376,7 +376,7 @@
</div>
<div class="tab-pane fade" id="pills-generate-blocks" role="tabpanel" aria-labelledby="pills-generate-blocks-tab" tabindex="0">
<div *ngIf="generateBlocksError != ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<div *ngIf="generateBlocksError !== ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<h4><i class="bi bi-exclamation-triangle m-2"></i></h4>&nbsp;&nbsp;
<div>
{{ generateBlocksError }}

View file

@ -4,9 +4,7 @@ import { NavbarService } from '../../shared/components/navbar/navbar.service';
import { MinerData } from '../../../common/MinerData';
import { NavigationEnd, Router } from '@angular/router';
import { NavbarLink } from '../../shared/components/navbar/navbar.model';
import { MineableTxBacklog } from '../../../common/MineableTxBacklog';
import { Chain } from '../../../common/Chain';
import { CoreIsBusyError } from '../../../common/error';
import { AuxPoW, BlockTemplate, GeneratedBlocks, MiningStatus } from '../../../common';
import { DaemonDataService } from '../../core/services';
@ -180,9 +178,7 @@ export class MiningComponent implements AfterViewInit {
}
private onNavigationEnd(): void {
this.refresh().then(() => {
this.cards = this.createCards();
});
this.refresh();
}
public async getBlockTemplate(): Promise<void> {
@ -191,7 +187,7 @@ export class MiningComponent implements AfterViewInit {
try {
this.blockTemplate = await this.daemonService.getBlockTemplate(this.getBlockTemplateAddress, this.getBlockTemplateReserveSize);
this.getBlockTemplateError = '';
} catch(error) {
} catch(error: any) {
this.getBlockTemplateError = `${error}`;
}
@ -211,7 +207,7 @@ export class MiningComponent implements AfterViewInit {
this.submitBlockError = '';
this.submitBlockSuccess = true;
}
catch(error) {
catch(error: any) {
console.error(error);
this.submitBlockError = `${error}`;
}
@ -239,7 +235,7 @@ export class MiningComponent implements AfterViewInit {
}
}
private async refresh(): Promise<void> {
private refresh(): void {
try {
const $table = $('#chainsTable');
@ -287,7 +283,7 @@ export class MiningComponent implements AfterViewInit {
try {
this.calculatedPowHash = await this.daemonService.calculatePoWHash(this.calcPowMajorVersion, this.calcPowHeight, this.calcPowBlobData, this.calcPowSeed)
} catch(error) {
} catch(error: any) {
this.calcPowError = `${error}`;
}
@ -301,7 +297,7 @@ export class MiningComponent implements AfterViewInit {
this.generatedBlocks = await this.daemonService.generateBlocks(this.generateBlocksAmountOfBlocks, this.generateBlocksAddress, this.generateBlockPrevBlock, this.generateStartingNonce);
this.generateBlocksError = '';
}
catch(error) {
catch(error: any) {
this.generateBlocksError = `${error}`;
}
@ -315,7 +311,7 @@ export class MiningComponent implements AfterViewInit {
this.startMiningError = '';
this.startMiningSuccess = true;
}
catch(error) {
catch(error: any) {
this.startMiningSuccess = false;
this.startMiningError = `${error}`;
}
@ -334,7 +330,7 @@ export class MiningComponent implements AfterViewInit {
this.stopMiningSuccess = true;
this.stopMiningError = '';
}
catch(error) {
catch(error: any) {
console.error(error);
this.stopMiningSuccess = false;
this.stopMiningError = `${error};`

View file

@ -62,7 +62,7 @@
<h4 class="mb-4">Set daemon bandwidth limits</h4>
<br>
<div *ngIf="setLimitError != ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<div *ngIf="setLimitError !== ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<h4><i class="bi bi-exclamation-triangle m-2"></i></h4>&nbsp;&nbsp;
<div>
{{setLimitError}}

View file

@ -206,7 +206,7 @@ export class NetworkComponent implements AfterViewInit, OnDestroy {
this.setLimitSuccess = true;
this.setLimitError = '';
}
catch (error) {
catch (error: any) {
console.error(error);
this.setLimitResult = undefined;
this.setLimitSuccess = false;

View file

@ -14,7 +14,7 @@
<div class="tab-pane fade show active" id="pills-outputs-overview" role="tabpanel" aria-labelledby="pills-outputs-overview-tab" tabindex="0">
<table
[hidden]="getOutsOuts.length == 0"
[hidden]="getOutsOuts.length === 0"
id="outsTable"
data-toggle="outsTable"
data-toolbar="#toolbar"
@ -34,14 +34,14 @@
<div class="tab-pane fade" id="pills-outputs-histogram" role="tabpanel" aria-labelledby="pills-outputs-histogram-tab" tabindex="0">
<div *ngIf="getOutDistributionError != ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<div *ngIf="getOutDistributionError !== ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<h4><i class="bi bi-exclamation-triangle m-2"></i></h4>&nbsp;&nbsp;
<div>
{{getOutHistogramError}}
</div>
</div>
<div *ngIf="getOutHistogramResult != undefined" class="alert alert-success d-flex align-items-center justify-content-center text-center" role="alert">
<div *ngIf="getOutHistogramResult !== undefined" class="alert alert-success d-flex align-items-center justify-content-center text-center" role="alert">
</div>
@ -101,14 +101,14 @@
</div>
<div class="tab-pane fade" id="pills-outputs-distribution" role="tabpanel" aria-labelledby="pills-outputs-distribution-tab" tabindex="0">
<div *ngIf="getOutDistributionError != ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<div *ngIf="getOutDistributionError !== ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<h4><i class="bi bi-exclamation-triangle m-2"></i></h4>&nbsp;&nbsp;
<div>
{{getOutDistributionError}}
</div>
</div>
<div *ngIf="getOutDistributionResult != undefined" class="alert alert-success d-flex align-items-center justify-content-center text-center" role="alert">
<div *ngIf="getOutDistributionResult !== undefined" class="alert alert-success d-flex align-items-center justify-content-center text-center" role="alert">
</div>
@ -163,7 +163,7 @@
<div class="tab-pane fade" id="pills-is-key-image-spent" role="tabpanel" aria-labelledby="pills-is-key-image-spent-tab" tabindex="0">
<div *ngIf="isKeyImageSpentError != ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<div *ngIf="isKeyImageSpentError !== ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<h4><i class="bi bi-exclamation-triangle m-2"></i></h4>&nbsp;&nbsp;
<div>
{{ isKeyImageSpentError }}

View file

@ -47,7 +47,7 @@ export class OutputsComponent implements AfterViewInit {
return [];
}
return JSON.parse(this.keyImagesJsonString);
return <string[]>JSON.parse(this.keyImagesJsonString);
}
public getOutHistogramAmountsJsonString: string = '';
@ -71,7 +71,7 @@ export class OutputsComponent implements AfterViewInit {
return [];
}
return JSON.parse(this.getOutDistributionAmountsJsonString);
return <number[]>JSON.parse(this.getOutDistributionAmountsJsonString);
}
constructor(private daemonService: DaemonService, private navbarService: NavbarService, private ngZone: NgZone) {
@ -84,12 +84,15 @@ export class OutputsComponent implements AfterViewInit {
this.daemonService.isRunning().then((value) => {
this.daemonRunning = value;
}).catch((error: any) => {
console.error(error);
this.daemonRunning = false;
})
}
ngAfterViewInit(): void {
public ngAfterViewInit(): void {
this.navbarService.setLinks(this.navbarLinks);
this.ngZone.run(() => {
this.ngZone.run(async () => {
//const $ = require('jquery');
//const bootstrapTable = require('bootstrap-table');
@ -101,7 +104,9 @@ export class OutputsComponent implements AfterViewInit {
classes: 'table table-bordered table-hover table-dark table-striped'
});
$table.bootstrapTable('showLoading');
this.load();
await this.load();
}).then().catch((error: any) => {
console.error(error);
});
}
@ -175,7 +180,7 @@ export class OutputsComponent implements AfterViewInit {
this.getOutDistributionResult = await this.daemonService.getOutputDistribution(amounts, cumulative, fromHeight, toHeight);
this.getOutDistributionError = '';
}
catch(error) {
catch(error: any) {
this.getOutDistributionError = `${error}`;
}
}
@ -211,7 +216,7 @@ export class OutputsComponent implements AfterViewInit {
this.isKeyImageSpentError = '';
}
} catch(error) {
} catch(error: any) {
this.isKeyImageSpentError = `${error}`;
this.isKeyImageSpentResult = undefined;
}

View file

@ -67,7 +67,7 @@
<div class="tab-pane fade" id="pills-in-peers" role="tabpanel" aria-labelledby="pills-in-peers-tab" tabindex="0">
<h4 class="mb3">Limit number of Incoming peers</h4>
<div *ngIf="limitInPeersError != ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<div *ngIf="limitInPeersError !== ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<h4><i class="bi bi-exclamation-triangle m-2"></i></h4>&nbsp;&nbsp;
<div>
{{limitInPeersError}}
@ -104,7 +104,7 @@
<div class="tab-pane fade" id="pills-out-peers" role="tabpanel" aria-labelledby="pills-out-peers-tab" tabindex="0">
<h4 class="mb3">Limit number of Outgoing peers</h4>
<div *ngIf="limitOutPeersError != ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<div *ngIf="limitOutPeersError !== ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<h4><i class="bi bi-exclamation-triangle m-2"></i></h4>&nbsp;&nbsp;
<div>
{{limitOutPeersError}}

View file

@ -3,7 +3,6 @@ import { DaemonDataService, DaemonService } from '../../core/services';
import { NavbarLink } from '../../shared/components/navbar/navbar.model';
import { NavbarService } from '../../shared/components/navbar/navbar.service';
import { Subscription } from 'rxjs';
import { resolve } from 'path';
@Component({
selector: 'app-peers',
@ -117,7 +116,7 @@ export class PeersComponent implements AfterViewInit, OnDestroy {
this.limitInPeersResult = await this.daemonService.inPeers(this.limitInPeers);
this.limitInPeersError = '';
this.limitInPeersSuccess = true;
} catch(error) {
} catch(error: any) {
console.error(error);
this.limitInPeersSuccess = false;
this.limitInPeersResult = 0;
@ -134,7 +133,7 @@ export class PeersComponent implements AfterViewInit, OnDestroy {
this.limitOutPeersResult = await this.daemonService.outPeers(this.limitOutPeers);
this.limitOutPeersError = '';
this.limitOutPeersSuccess = true;
} catch(error) {
} catch(error: any) {
console.error(error);
this.limitOutPeersSuccess = false;
this.limitOutPeersResult = 0;

View file

@ -14,7 +14,7 @@
</div>
<div *ngIf="!loading" class="tab-content" id="pills-settings-tabContent">
<div *ngIf="savingChangesError != ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<div *ngIf="savingChangesError !== ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<h4><i class="bi bi-exclamation-triangle m-2"></i></h4>&nbsp;&nbsp;
<div>
{{savingChangesError}}
@ -245,9 +245,9 @@
<div class="col-md-4">
<label for="rpc-ssl" class="form-label">SSL Mode</label>
<select class="form-select" id="rpc-ssl" [(ngModel)]="currentSettings.rpcSsl" [ngModelOptions]="{standalone: true}">
<option [ngValue]="'autodetect'" [selected]="currentSettings.rpcSsl == 'autodetect'">Autodetect</option>
<option [ngValue]="'enabled'" [selected]="currentSettings.rpcSsl == 'enabled'">Enabled</option>
<option [ngValue]="'disabled'" [selected]="currentSettings.rpcSsl == 'disabled'">Disabled</option>
<option [ngValue]="'autodetect'" [selected]="currentSettings.rpcSsl === 'autodetect'">Autodetect</option>
<option [ngValue]="'enabled'" [selected]="currentSettings.rpcSsl === 'enabled'">Enabled</option>
<option [ngValue]="'disabled'" [selected]="currentSettings.rpcSsl === 'disabled'">Disabled</option>
</select>
</div>

View file

@ -1,4 +1,4 @@
import { AfterViewInit, Component, NgZone } from '@angular/core';
import { Component, NgZone } from '@angular/core';
import { NavbarLink } from '../../shared/components/navbar/navbar.model';
import { DaemonSettings } from '../../../common/DaemonSettings';
import { DaemonService } from '../../core/services/daemon/daemon.service';
@ -8,7 +8,7 @@ import { DaemonService } from '../../core/services/daemon/daemon.service';
templateUrl: './settings.component.html',
styleUrl: './settings.component.scss'
})
export class SettingsComponent implements AfterViewInit {
export class SettingsComponent {
public readonly navbarLinks: NavbarLink[];
@ -48,7 +48,11 @@ export class SettingsComponent implements AfterViewInit {
this.rpcLoginPassword = '';
}
this.load();
this.load().then(() => {
console.debug("Settings loaded");
}).catch((error: any) => {
console.error(error);
});
}
private async load(): Promise<void> {
@ -72,10 +76,6 @@ export class SettingsComponent implements AfterViewInit {
return !this.modified || this.daemonService.restarting || this.daemonService.starting || this.daemonService.stopping;
}
ngAfterViewInit(): void {
}
public OnOfflineChange() {
this.currentSettings.offline = !this.currentSettings.offline;
}
@ -171,7 +171,7 @@ export class SettingsComponent implements AfterViewInit {
this.savingChangesError = ``;
this.savingChangesSuccess = true;
}
catch(error) {
catch(error: any) {
console.error(error);
this.savingChangesError = `${error}`;
this.savingChangesSuccess = false;

View file

@ -162,7 +162,7 @@
<div class="tab-pane fade" id="pills-get-fee-estimate" role="tabpanel" aria-labelledby="pills-get-fee-estimate-tab" tabindex="0">
<h4 class="mb-3">Get an estimation on fees per byte</h4>
<div *ngIf="getFeeEstimateError != ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<div *ngIf="getFeeEstimateError !== ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<h4><i class="bi bi-exclamation-triangle m-2"></i></h4>&nbsp;&nbsp;
<div>
{{getFeeEstimateError}}
@ -205,7 +205,7 @@
<div class="row g-5 p-2">
<div class="col-md-7 col-lg-12">
<div *ngIf="getCoinbaseTxSumError != ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<div *ngIf="getCoinbaseTxSumError !== ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<h4><i class="bi bi-exclamation-triangle m-2"></i></h4>&nbsp;&nbsp;
<div>
{{getCoinbaseTxSumError}}

View file

@ -155,7 +155,7 @@ export class TransactionsComponent implements AfterViewInit, OnDestroy {
console.log(this.txPoolBacklog)
}
catch (error) {
throw error;
console.error(error);
}
}
@ -192,7 +192,7 @@ export class TransactionsComponent implements AfterViewInit, OnDestroy {
this.relaySuccess = true;
this.relayError = '';
}
catch(error) {
catch(error: any) {
console.error(error);
this.relaySuccess = false;
this.relayError = `${error}`;
@ -226,7 +226,7 @@ export class TransactionsComponent implements AfterViewInit, OnDestroy {
this.getCoinbaseTxSumSuccess = true;
this.getCoinbaseTxSumError = '';
}
catch(error) {
catch(error: any) {
console.error(error);
this.getCoinbaseTxSumSuccess = false;
this.getCoinbaseTxSumError = `${error}`;
@ -263,7 +263,7 @@ export class TransactionsComponent implements AfterViewInit, OnDestroy {
this.sendRawTxSuccess = true;
this.sendRawTxError = '';
}
catch(error) {
catch(error: any) {
this.sendRawTxError = `${error}`;
}
@ -287,7 +287,7 @@ export class TransactionsComponent implements AfterViewInit, OnDestroy {
this.getFeeEstimateError = ``;
}
catch(error) {
catch(error: any) {
console.error(error);
this.feeEstimateCards = [];
this.getFeeEstimateSuccess = false;

View file

@ -13,7 +13,7 @@
<div class="tab-content" id="pills-tabContent">
<div class="tab-pane fade show active" id="pills-monero" role="tabpanel" aria-labelledby="pills-monero-tab" tabindex="0">
<div *ngIf="upgradeError != ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<div *ngIf="upgradeError !== ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<h4><i class="bi bi-exclamation-triangle m-2"></i></h4>&nbsp;&nbsp;
<div>
{{upgradeError}}

View file

@ -1,5 +1,4 @@
import { AfterViewInit, Component } from '@angular/core';
import { NavbarService } from '../../shared/components/navbar/navbar.service';
import { NavbarLink } from '../../shared/components/navbar/navbar.model';
import { DaemonService } from '../../core/services/daemon/daemon.service';
import { SimpleBootstrapCard } from '../../shared/utils';
@ -80,6 +79,7 @@ export class VersionComponent implements AfterViewInit {
this.cards = this.createCards();
})
.catch((error: any) => {
console.error(error);
this.currentVersion = undefined;
this.latestVersion = undefined
this.cards = this.createErrorCards();
@ -117,7 +117,7 @@ export class VersionComponent implements AfterViewInit {
throw new Error("Download path not configured");
}
const downloadUrl = 'https://downloads.getmonero.org/cli/linux64'; // Cambia in base al sistema
//const downloadUrl = 'https://downloads.getmonero.org/cli/linux64'; // Cambia in base al sistema
const destination = settings.downloadUpgradePath; // Aggiorna con il percorso desiderato
const moneroFolder = await this.moneroInstaller.downloadMonero(destination);
@ -129,7 +129,7 @@ export class VersionComponent implements AfterViewInit {
this.upgradeError = '';
this.upgradeSuccess = true;
}
catch(error) {
catch(error: any) {
console.error(error);
this.upgradeSuccess = false;
this.upgradeError = `${error}`;

View file

@ -1,4 +1,4 @@
import { Component, Input, NgZone } from '@angular/core';
import { Component, NgZone } from '@angular/core';
import { DaemonService } from '../../../core/services/daemon/daemon.service';
import { DaemonDataService, MoneroInstallerService } from '../../../core/services';
@ -44,6 +44,9 @@ export class DaemonNotRunningComponent {
constructor(private installer: MoneroInstallerService, private daemonData: DaemonDataService, private daemonService: DaemonService, private ngZone: NgZone) {
this.daemonService.getSettings().then((settings) => {
this.daemonConfigured = settings.monerodPath != '';
}).catch((error: any) => {
console.error(error);
this.daemonConfigured = false;
})
}
@ -58,29 +61,23 @@ export class DaemonNotRunningComponent {
}
await new Promise<void>((resolve, reject) => {
setTimeout(async () => {
try {
await this.daemonService.startDaemon();
setTimeout(() => {
this.daemonService.startDaemon().then(() => {
resolve();
}
catch(error) {
console.error(error);
}).catch((error: any) => {
reject(error);
}
});
}, 500)});
}
public async restartDaemon(): Promise<void> {
await new Promise<void>((resolve, reject) => {
setTimeout(async () => {
try {
await this.daemonService.restartDaemon();
setTimeout(() => {
this.daemonService.restartDaemon().then(() => {
resolve();
}
catch(error) {
console.error(error);
}).catch((error: any) => {
reject(error);
}
});
}, 500)});
}

View file

@ -38,6 +38,9 @@ export class NavbarComponent {
this.ngZone.run(() => {
this._running = running;
});
}).catch((error) => {
console.error(error);
this._running = false;
});
this.daemonService.onDaemonStatusChanged.subscribe((running: boolean) => {

View file

@ -24,6 +24,9 @@ export class NavbarService {
this.daemonRunning = running;
if (!running) this.disableLinks();
if (running) this.enableLinks();
}).catch((error: any) => {
console.error(error);
this.disableLinks();
})
}

View file

@ -1,6 +1,5 @@
import { CommonModule, NgClass, NgFor } from '@angular/common';
import { Component, Input, OnChanges, SimpleChanges } from '@angular/core';
import { ChildActivationEnd, ChildActivationStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, RouteConfigLoadEnd, RouteConfigLoadStart, Router, RouterEvent, RouterModule, RoutesRecognized } from '@angular/router';
import { Component, Input } from '@angular/core';
import { Router } from '@angular/router';
import { DaemonService } from '../../../core/services/daemon/daemon.service';
@Component({
@ -8,7 +7,7 @@ import { DaemonService } from '../../../core/services/daemon/daemon.service';
templateUrl: './sidebar.component.html',
styleUrl: './sidebar.component.scss'
})
export class SidebarComponent implements OnChanges {
export class SidebarComponent {
@Input() public isDaemonRunning: boolean = false;
public navLinks: NavLink[] = [];
@ -56,11 +55,6 @@ export class SidebarComponent implements OnChanges {
return navLink.path == this.router.url;
}
public ngOnChanges(changes: SimpleChanges): void {
this.navLinks = this.createFullLinks();
}
}
class NavLink {

View file

@ -15,6 +15,13 @@ export class AuxPoW {
}
public static parse(auxPoW: any): AuxPoW {
return new AuxPoW(auxPoW.id, auxPoW.hash);
const id: string = auxPoW.id;
const hash: string = auxPoW.hash;
if (typeof id != 'string' || typeof hash != 'string') {
throw new Error("Could not parse aux pow object");
}
return new AuxPoW(id, hash);
}
}

View file

@ -21,9 +21,13 @@ export class Ban {
}
public static parse(ban: any): Ban {
const host = ban.host;
const ip = ban.ip;
const seconds = ban.seconds;
const host: string = ban.host;
const ip: number = ban.ip;
const seconds: number = ban.seconds;
if (typeof host != 'string' || typeof ip != 'number' || typeof seconds != 'number') {
throw new Error("Could not parse ban object");
}
return new Ban(host, ip, true, seconds);
}

View file

@ -13,9 +13,14 @@ export class Block {
}
public static parse(block: any): Block {
const blob = block.blob;
const blockHeader = BlockHeader.parse(block.block_header);
const details = BlockDetails.parse(block.json);
const blob: string= block.blob;
const blockHeader = BlockHeader.parse(<string>block.block_header);
if (typeof blob != 'string' || typeof block.json != 'string') {
throw new Error("Could not parse block object");
}
const details = BlockDetails.parse(<string>block.json);
return new Block(blob, blockHeader, details);
}

View file

@ -15,7 +15,7 @@ export class BlockCount {
throw new Error("Cannot parse null value");
}
const count: number = parseInt(blockCount.count);
const count: number = parseInt(<string>blockCount.count);
if (typeof blockCount.status != "string") {
throw new Error("Invalid block count status");

View file

@ -21,13 +21,13 @@ export class BlockDetails {
public static parse(details: string): BlockDetails {
const blockDetails = JSON.parse(details);
const majorVersion = blockDetails.major_version;
const minorVersion = blockDetails.minor_version;
const timestamp = blockDetails.timestamp;
const prevId = blockDetails.prev_id;
const nonce = blockDetails.nonce;
const majorVersion: number = blockDetails.major_version;
const minorVersion: number = blockDetails.minor_version;
const timestamp: number = blockDetails.timestamp;
const prevId: string = blockDetails.prev_id;
const nonce: number = blockDetails.nonce;
const minerTx = MinerTx.parse(blockDetails.miner_tx);
const txHashes = blockDetails.tx_hashes;
const txHashes: string[] = blockDetails.tx_hashes;
return new BlockDetails(majorVersion, minorVersion, timestamp, prevId, nonce, minerTx, txHashes);
}

View file

@ -77,28 +77,29 @@ export class BlockHeader {
}
public static parse(blockHeader: any): BlockHeader {
const blockSize = blockHeader.block_size;
const blockWeight = blockHeader.block_weight;
const cumulativeDifficulty = blockHeader.cumulative_difficulty;
const cumulativeDifficultyTop64 = blockHeader.cumulative_difficulty_top64;
const depth = blockHeader.depth;
const difficulty = blockHeader.difficulty;
const difficultyTop64 = blockHeader.difficulty_top64;
const hash = blockHeader.hash;
const height = blockHeader.height;
const longTermWeight = blockHeader.long_term_weight;
const majorVersion = blockHeader.major_version;
const minerTxHash = blockHeader.miner_tx_hash;
const minorVersion = blockHeader.minor_version;
const nonce = blockHeader.nonce;
const numTxes = blockHeader.num_txes;
const orphanStatus = blockHeader.orphan_status;
const powHash = blockHeader.pow_hash;
const prevHash = blockHeader.prev_hash;
const reward = blockHeader.reward;
const timestamp = blockHeader.timestamp;
const wideCumulativeDifficulty = blockHeader.wide_cumulative_difficulty;
const wideDifficulty = blockHeader.wide_difficulty;
const blockSize: number = blockHeader.block_size;
const blockWeight: number = blockHeader.block_weight;
const cumulativeDifficulty: number = blockHeader.cumulative_difficulty;
const cumulativeDifficultyTop64: number = blockHeader.cumulative_difficulty_top64;
const depth: number = blockHeader.depth;
const difficulty: number = blockHeader.difficulty;
const difficultyTop64: number = blockHeader.difficulty_top64;
const hash: string = blockHeader.hash;
const height: number = blockHeader.height;
const longTermWeight: number = blockHeader.long_term_weight;
const majorVersion: number = blockHeader.major_version;
const minerTxHash: string = blockHeader.miner_tx_hash;
const minorVersion: number = blockHeader.minor_version;
const nonce: number = blockHeader.nonce;
const numTxes: number = blockHeader.num_txes;
const orphanStatus: boolean = blockHeader.orphan_status;
const powHash: string = blockHeader.pow_hash;
const prevHash: string = blockHeader.prev_hash;
const reward: number = blockHeader.reward;
const timestamp: number = blockHeader.timestamp;
const wideCumulativeDifficulty: string = blockHeader.wide_cumulative_difficulty;
const wideDifficulty: string = blockHeader.wide_difficulty;
return new BlockHeader(blockSize, blockWeight, cumulativeDifficulty, cumulativeDifficultyTop64, depth, difficulty, difficultyTop64, hash, height, longTermWeight, majorVersion, minerTxHash, minorVersion, nonce, numTxes, orphanStatus, powHash, prevHash, reward, timestamp, wideCumulativeDifficulty, wideDifficulty);
}
}

View file

@ -32,20 +32,20 @@ export class BlockTemplate {
}
public static parse(blockTemplate: any): BlockTemplate {
const blockHashingBlob = blockTemplate.blockhashing_blob;
const blockTemplateBlob = blockTemplate.blocktemplate_blob;
const difficulty = blockTemplate.difficulty;
const difficultyTop64 = blockTemplate.difficulty_top64;
const expectedReward = blockTemplate.expected_reward;
const height = blockTemplate.height;
const nextSeedHash = blockTemplate.next_seed_hash;
const prevHash = blockTemplate.prev_hash;
const reservedOffset = blockTemplate.reserved_offset;
const seedHash = blockTemplate.seed_hash;
const seedHeight = blockTemplate.seed_height;
const status = blockTemplate.status;
const untrusted = blockTemplate.untrusted;
const wideDifficulty = blockTemplate.wide_difficulty;
const blockHashingBlob: string = blockTemplate.blockhashing_blob;
const blockTemplateBlob: string = blockTemplate.blocktemplate_blob;
const difficulty: number = blockTemplate.difficulty;
const difficultyTop64: number = blockTemplate.difficulty_top64;
const expectedReward: number = blockTemplate.expected_reward;
const height: number = blockTemplate.height;
const nextSeedHash: string = blockTemplate.next_seed_hash;
const prevHash: string = blockTemplate.prev_hash;
const reservedOffset: number = blockTemplate.reserved_offset;
const seedHash: string = blockTemplate.seed_hash;
const seedHeight: number = blockTemplate.seed_height;
const status: string = blockTemplate.status;
const untrusted: boolean = blockTemplate.untrusted;
const wideDifficulty: string = blockTemplate.wide_difficulty;
return new BlockTemplate(blockHashingBlob, blockTemplateBlob, difficulty, difficultyTop64, expectedReward, height, nextSeedHash, prevHash, reservedOffset, seedHash, seedHeight, status, untrusted, wideDifficulty);
}
}

View file

@ -8,8 +8,8 @@ export class BlockchainPruneInfo {
}
public static parse(info: any): BlockchainPruneInfo {
const pruned = info.pruned;
const pruningSeed = info.pruning_seed;
const pruned: boolean = info.pruned;
const pruningSeed: number = info.pruning_seed;
return new BlockchainPruneInfo(pruned, pruningSeed);
}

View file

@ -20,14 +20,14 @@ export class Chain {
}
public static parse(chain: any): Chain {
const blockHash = chain.block_hash;
const blockHashes = chain.block_hashes;
const difficulty = chain.difficulty;
const difficultyTop64 = chain.difficulty_top64;
const height = chain.height;
const length = chain.length;
const mainChainParentBlock = chain.main_chain_parent_block;
const wideDifficulty = chain.wide_difficulty;
const blockHash: string = chain.block_hash;
const blockHashes: string[] = chain.block_hashes;
const difficulty: number = chain.difficulty;
const difficultyTop64: number = chain.difficulty_top64;
const height: number = chain.height;
const length: number = chain.length;
const mainChainParentBlock: string = chain.main_chain_parent_block;
const wideDifficulty: string = chain.wide_difficulty;
return new Chain(blockHash, blockHashes, difficulty, difficultyTop64, height, length, mainChainParentBlock, wideDifficulty);
}

View file

@ -18,13 +18,13 @@ export class CoinbaseTxSum {
}
public static parse(coinbaseTxSum: any): CoinbaseTxSum {
const emissionAmount = coinbaseTxSum.emission_amount;
const emissionAmountTop64 = coinbaseTxSum.emission_amount_top64;
const feeAmount = coinbaseTxSum.fee_amount;
const feeAmountTop64 = coinbaseTxSum.fee_amount_top64;
const topHash = coinbaseTxSum.top_hash;
const wideEmissionAmount = coinbaseTxSum.wide_emission_amount;
const wideFeeAmount = coinbaseTxSum.wide_fee_amount;
const emissionAmount: number = coinbaseTxSum.emission_amount;
const emissionAmountTop64: number = coinbaseTxSum.emission_amount_top64;
const feeAmount: number = coinbaseTxSum.fee_amount;
const feeAmountTop64: number = coinbaseTxSum.fee_amount_top64;
const topHash: string = coinbaseTxSum.top_hash;
const wideEmissionAmount: string = coinbaseTxSum.wide_emission_amount;
const wideFeeAmount: string = coinbaseTxSum.wide_fee_amount;
return new CoinbaseTxSum(emissionAmount, emissionAmountTop64, feeAmount, feeAmountTop64, topHash, wideEmissionAmount, wideFeeAmount);
}

View file

@ -74,28 +74,28 @@ export class Connection {
}
public static parse(connection: any): Connection {
const address = connection.address;
const avgDownload = connection.avg_download;
const avgUpload = connection.avg_upload;
const connectionId = connection.connection_id;
const currentDownload = connection.current_download;
const currentUpload = connection.current_upload;
const height = connection.height;
const host = connection.host;
const incoming = connection.incoming;
const ip = connection.ip;
const liveTime = connection.live_time;
const localIp = connection.local_ip;
const localhost = connection.localhost;
const peerId = connection.peer_id;
const port = connection.port;
const pruningSeed = connection.pruning_seed;
const recvCount = connection.recv_count;
const recvIdleTime = connection.recv_idle_time;
const sendCount = connection.send_count;
const sendIdleTime = connection.send_idle_time;
const state = connection.state;
const supportFlags = connection.support_flags;
const address: string = connection.address;
const avgDownload: number = connection.avg_download;
const avgUpload: number = connection.avg_upload;
const connectionId: string = connection.connection_id;
const currentDownload: number = connection.current_download;
const currentUpload: number = connection.current_upload;
const height: number = connection.height;
const host: number = connection.host;
const incoming: boolean = connection.incoming;
const ip: string = connection.ip;
const liveTime: number = connection.live_time;
const localIp: boolean = connection.local_ip;
const localhost: boolean = connection.localhost;
const peerId: string = connection.peer_id;
const port: string = connection.port;
const pruningSeed: number = connection.pruning_seed;
const recvCount: number = connection.recv_count;
const recvIdleTime: number = connection.recv_idle_time;
const sendCount: number = connection.send_count;
const sendIdleTime: number = connection.send_idle_time;
const state: string = connection.state;
const supportFlags: number = connection.support_flags;
return new Connection(address, avgDownload, avgUpload, connectionId, currentDownload, currentUpload, height, host, incoming, ip, liveTime, localIp, localhost, peerId, port, pruningSeed, recvCount, recvIdleTime, sendCount, sendIdleTime, state, supportFlags);
}

View file

@ -1,206 +1,205 @@
export class DaemonInfo {
public readonly adjustedTime: number;
public readonly altBlocksCount: number;
public readonly blockSizeLimit: number;
public readonly blockSizeMedian: number;
public readonly bootstrapDaemonAddress: string;
public readonly busySyncing: boolean;
public readonly credits: number;
public readonly cumulativeDifficulty: number;
public readonly cumulativeDifficultyTop64: number;
public readonly databaseSize: number;
public readonly difficulty: number;
public readonly difficultyTop64: number;
public readonly freeSpace: number;
public readonly greyPeerlistSize: number;
public readonly height: number;
public readonly heightWithoutBootstrap: number;
public readonly incomingConnectionsCount: number;
public readonly mainnet: boolean;
public readonly nettype: string;
public readonly offline: boolean;
public readonly outgoingConnectionsCount: number;
public readonly rpcConnectionsCount: number;
public readonly stagenet: boolean;
public readonly startTime: number;
public readonly status: string;
public readonly synchronized: boolean;
public readonly target: number;
public readonly targetHeight: number;
public readonly testnet: boolean;
public readonly topBlockHash: string;
public readonly topHash: string;
public readonly txCount: number;
public readonly txPoolSize: number;
public readonly untrusted: boolean;
public readonly updateAvailable: boolean;
public readonly version: string;
public readonly wasBoostrapEverUsed: boolean;
public readonly whitePeerlistSize: number;
public readonly wideCumulativeDifficulty: string;
public readonly wideDifficulty: string;
public readonly adjustedTime: number;
public readonly altBlocksCount: number;
public readonly blockSizeLimit: number;
public readonly blockSizeMedian: number;
public readonly bootstrapDaemonAddress: string;
public readonly busySyncing: boolean;
public readonly credits: number;
public readonly cumulativeDifficulty: number;
public readonly cumulativeDifficultyTop64: number;
public readonly databaseSize: number;
public readonly difficulty: number;
public readonly difficultyTop64: number;
public readonly freeSpace: number;
public readonly greyPeerlistSize: number;
public readonly height: number;
public readonly heightWithoutBootstrap: number;
public readonly incomingConnectionsCount: number;
public readonly mainnet: boolean;
public readonly nettype: string;
public readonly offline: boolean;
public readonly outgoingConnectionsCount: number;
public readonly rpcConnectionsCount: number;
public readonly stagenet: boolean;
public readonly startTime: number;
public readonly status: string;
public readonly synchronized: boolean;
public readonly target: number;
public readonly targetHeight: number;
public readonly testnet: boolean;
public readonly topBlockHash: string;
public readonly topHash: string;
public readonly txCount: number;
public readonly txPoolSize: number;
public readonly untrusted: boolean;
public readonly updateAvailable: boolean;
public readonly version: string;
public readonly wasBoostrapEverUsed: boolean;
public readonly whitePeerlistSize: number;
public readonly wideCumulativeDifficulty: string;
public readonly wideDifficulty: string;
public get hashRate(): number {
const target = this.target;
public get hashRate(): number {
const target = this.target;
if (target <= 0) {
return 0;
}
return this.difficulty / this.target;
if (target <= 0) {
return 0;
}
public get kiloHashRate(): number {
return this.hashRate / 1000;
}
return this.difficulty / this.target;
}
public get megaHashRate(): number {
return this.kiloHashRate / 1000;
}
public get kiloHashRate(): number {
return this.hashRate / 1000;
}
public get gigaHashRate(): number {
return this.hashRate / 1000;
}
public get megaHashRate(): number {
return this.kiloHashRate / 1000;
}
constructor(
adjustedTime: number,
altBlocksCount: number,
blockSizeLimit: number,
blockSizeMedian: number,
bootstrapDaemonAddress: string,
busySyncing: boolean,
credits: number,
cumulativeDifficulty: number,
cumulativeDifficultyTop64: number,
databaseSize: number,
difficulty: number,
difficultyTop64: number,
freeSpace: number,
greyPeerlistSize: number,
height: number,
heightWithoutBootstrap: number,
incomingConnectionsCount: number,
mainnet: boolean,
nettype: string,
offline: boolean,
outgoingConnectionsCount: number,
rpcConnectionsCount: number,
stagenet: boolean,
startTime: number,
status: string,
synchronized: boolean,
target: number,
targetHeight: number,
testnet: boolean,
topBlockHash: string,
topHash: string,
txCount: number,
txPoolSize: number,
untrusted: boolean,
updateAvailable: boolean,
version: string,
wasBoostrapEverUsed: boolean,
whitePeerlistSize: number,
wideCumulativeDifficulty: string,
wideDifficulty: string
) {
this.adjustedTime = adjustedTime;
this.altBlocksCount = altBlocksCount;
this.blockSizeLimit = blockSizeLimit;
this.blockSizeMedian = blockSizeMedian;
this.bootstrapDaemonAddress = bootstrapDaemonAddress;
this.busySyncing = busySyncing;
this.credits = credits;
this.cumulativeDifficulty = cumulativeDifficulty;
this.cumulativeDifficultyTop64 = cumulativeDifficultyTop64;
this.databaseSize = databaseSize;
this.difficulty = difficulty;
this.difficultyTop64 = difficultyTop64;
this.freeSpace = freeSpace;
this.greyPeerlistSize = greyPeerlistSize;
this.height = height;
this.heightWithoutBootstrap = heightWithoutBootstrap;
this.incomingConnectionsCount = incomingConnectionsCount;
this.mainnet = mainnet;
this.nettype = nettype;
this.offline = offline;
this.outgoingConnectionsCount = outgoingConnectionsCount;
this.rpcConnectionsCount = rpcConnectionsCount;
this.stagenet = stagenet;
this.startTime = startTime;
this.status = status;
this.synchronized = synchronized;
this.target = target;
this.targetHeight = targetHeight;
this.testnet = testnet;
this.topBlockHash = topBlockHash;
this.topHash = topHash;
this.txCount = txCount;
this.txPoolSize = txPoolSize;
this.untrusted = untrusted;
this.updateAvailable = updateAvailable;
this.version = version;
this.wasBoostrapEverUsed = wasBoostrapEverUsed;
this.whitePeerlistSize = whitePeerlistSize;
this.wideCumulativeDifficulty = wideCumulativeDifficulty;
this.wideDifficulty = wideDifficulty;
}
public get gigaHashRate(): number {
return this.hashRate / 1000;
}
public static parse(info: any): DaemonInfo {
const adjustedTime = info.adjusted_time;
const altBlocksCount = info.alt_blocks_count;
const blockSizeLimit = info.block_size_limit;
const blockSizeMedian = info.block_size_median;
const bootstrapDaemonAddress = info.bootstrap_daemon_address;
const busySyncing = info.busy_syncing;
const credits = info.credits;
const cumulativeDifficulty = info.cumulative_difficulty;
const cumulativeDifficultyTop64 = info.cumulative_difficulty_top64;
const databaseSize = info.database_size;
const difficulty = info.difficulty;
const difficultyTop64 = info.difficulty_top64;
const freeSpace = info.free_space;
const greyPeerlistSize = info.grey_peerlist_size;
const height = info.height;
const heightWithoutBootstrap = info.height_without_bootstrap;
const incomingConnectionsCount = info.incoming_connections_count;
const mainnet = info.mainnet;
const nettype = info.nettype;
const offline = info.offline;
const outgoingConnectionsCount = info.outgoing_connections_count;
const rpcConnectionsCount = info.rpc_connections_count;
const stagenet = info.stagenet;
const startTime = info.start_time;
const status = info.status;
const synchronized = info.synchronized;
const target = info.target;
const targetHeight = info.target_height;
const testnet = info.testnet;
const topBlockHash = info.top_block_hash;
const topHash = info.top_hash;
const txCount = info.tx_count;
const txPoolSize = info.tx_pool_size;
const untrusted = info.untrusted;
const updateAvailable = info.update_available;
const version = info.version;
const wasBoostrapEverUsed = info.was_boostrap_ever_used;
const whitePeerlistSize = info.white_peerlist_size;
const wideCumulativeDifficulty = info.wide_cumulative_difficulty;
const wideDifficulty = info.wide_difficulty;
constructor(
adjustedTime: number,
altBlocksCount: number,
blockSizeLimit: number,
blockSizeMedian: number,
bootstrapDaemonAddress: string,
busySyncing: boolean,
credits: number,
cumulativeDifficulty: number,
cumulativeDifficultyTop64: number,
databaseSize: number,
difficulty: number,
difficultyTop64: number,
freeSpace: number,
greyPeerlistSize: number,
height: number,
heightWithoutBootstrap: number,
incomingConnectionsCount: number,
mainnet: boolean,
nettype: string,
offline: boolean,
outgoingConnectionsCount: number,
rpcConnectionsCount: number,
stagenet: boolean,
startTime: number,
status: string,
synchronized: boolean,
target: number,
targetHeight: number,
testnet: boolean,
topBlockHash: string,
topHash: string,
txCount: number,
txPoolSize: number,
untrusted: boolean,
updateAvailable: boolean,
version: string,
wasBoostrapEverUsed: boolean,
whitePeerlistSize: number,
wideCumulativeDifficulty: string,
wideDifficulty: string
) {
this.adjustedTime = adjustedTime;
this.altBlocksCount = altBlocksCount;
this.blockSizeLimit = blockSizeLimit;
this.blockSizeMedian = blockSizeMedian;
this.bootstrapDaemonAddress = bootstrapDaemonAddress;
this.busySyncing = busySyncing;
this.credits = credits;
this.cumulativeDifficulty = cumulativeDifficulty;
this.cumulativeDifficultyTop64 = cumulativeDifficultyTop64;
this.databaseSize = databaseSize;
this.difficulty = difficulty;
this.difficultyTop64 = difficultyTop64;
this.freeSpace = freeSpace;
this.greyPeerlistSize = greyPeerlistSize;
this.height = height;
this.heightWithoutBootstrap = heightWithoutBootstrap;
this.incomingConnectionsCount = incomingConnectionsCount;
this.mainnet = mainnet;
this.nettype = nettype;
this.offline = offline;
this.outgoingConnectionsCount = outgoingConnectionsCount;
this.rpcConnectionsCount = rpcConnectionsCount;
this.stagenet = stagenet;
this.startTime = startTime;
this.status = status;
this.synchronized = synchronized;
this.target = target;
this.targetHeight = targetHeight;
this.testnet = testnet;
this.topBlockHash = topBlockHash;
this.topHash = topHash;
this.txCount = txCount;
this.txPoolSize = txPoolSize;
this.untrusted = untrusted;
this.updateAvailable = updateAvailable;
this.version = version;
this.wasBoostrapEverUsed = wasBoostrapEverUsed;
this.whitePeerlistSize = whitePeerlistSize;
this.wideCumulativeDifficulty = wideCumulativeDifficulty;
this.wideDifficulty = wideDifficulty;
}
public static parse(info: any): DaemonInfo {
const adjustedTime: number = info.adjusted_time;
const altBlocksCount: number = info.alt_blocks_count;
const blockSizeLimit: number = info.block_size_limit;
const blockSizeMedian: number = info.block_size_median;
const bootstrapDaemonAddress: string = info.bootstrap_daemon_address;
const busySyncing: boolean = info.busy_syncing;
const credits: number = info.credits;
const cumulativeDifficulty: number = info.cumulative_difficulty;
const cumulativeDifficultyTop64: number = info.cumulative_difficulty_top64;
const databaseSize: number = info.database_size;
const difficulty: number = info.difficulty;
const difficultyTop64: number = info.difficulty_top64;
const freeSpace: number = info.free_space;
const greyPeerlistSize: number = info.grey_peerlist_size;
const height: number = info.height;
const heightWithoutBootstrap: number = info.height_without_bootstrap;
const incomingConnectionsCount: number = info.incoming_connections_count;
const mainnet: boolean = info.mainnet;
const nettype: string = info.nettype;
const offline: boolean = info.offline;
const outgoingConnectionsCount: number = info.outgoing_connections_count;
const rpcConnectionsCount: number = info.rpc_connections_count;
const stagenet: boolean = info.stagenet;
const startTime: number = info.start_time;
const status: string = info.status;
const synchronized: boolean = info.synchronized;
const target: number = info.target;
const targetHeight: number = info.target_height;
const testnet: boolean = info.testnet;
const topBlockHash: string = info.top_block_hash;
const topHash: string = info.top_hash;
const txCount: number = info.tx_count;
const txPoolSize: number = info.tx_pool_size;
const untrusted: boolean = info.untrusted;
const updateAvailable: boolean = info.update_available;
const version: string = info.version;
const wasBoostrapEverUsed: boolean = info.was_boostrap_ever_used;
const whitePeerlistSize: number = info.white_peerlist_size;
const wideCumulativeDifficulty: string = info.wide_cumulative_difficulty;
const wideDifficulty: string = info.wide_difficulty;
return new DaemonInfo(
adjustedTime, altBlocksCount, blockSizeLimit, blockSizeMedian,
bootstrapDaemonAddress, busySyncing, credits, cumulativeDifficulty,
cumulativeDifficultyTop64, databaseSize, difficulty,
difficultyTop64, freeSpace, greyPeerlistSize,
height, heightWithoutBootstrap, incomingConnectionsCount, mainnet,
nettype, offline, outgoingConnectionsCount, rpcConnectionsCount,
stagenet, startTime, status, synchronized, target, targetHeight,
testnet, topBlockHash, topHash, txCount, txPoolSize, untrusted,
updateAvailable, version, wasBoostrapEverUsed, whitePeerlistSize,
wideCumulativeDifficulty, wideDifficulty
);
}
return new DaemonInfo(
adjustedTime, altBlocksCount, blockSizeLimit, blockSizeMedian,
bootstrapDaemonAddress, busySyncing, credits, cumulativeDifficulty,
cumulativeDifficultyTop64, databaseSize, difficulty,
difficultyTop64, freeSpace, greyPeerlistSize,
height, heightWithoutBootstrap, incomingConnectionsCount, mainnet,
nettype, offline, outgoingConnectionsCount, rpcConnectionsCount,
stagenet, startTime, status, synchronized, target, targetHeight,
testnet, topBlockHash, topHash, txCount, txPoolSize, untrusted,
updateAvailable, version, wasBoostrapEverUsed, whitePeerlistSize,
wideCumulativeDifficulty, wideDifficulty
);
}
}

View file

@ -153,14 +153,14 @@ export class DaemonSettings {
}
// Ottieni tutte le chiavi degli oggetti
const keys1 = Object.keys(obj1);
const keys2 = Object.keys(obj2);
const keys1 = Object.keys(<object>obj1);
const keys2 = Object.keys(<object>obj2);
// Se hanno un numero diverso di chiavi, non sono uguali
if (keys1.length !== keys2.length) return false;
// Controlla che ogni chiave e valore sia equivalente
for (let key of keys1) {
for (const key of keys1) {
// Se una chiave di obj1 non esiste in obj2, non sono uguali
if (!keys2.includes(key)) return false;

View file

@ -10,9 +10,9 @@ export class FeeEstimate {
}
public static parse(estimate: any): FeeEstimate {
const fee = estimate.fee;
const fees = estimate.fees;
const quantizationMask = estimate.quantization_mask;
const fee: number = estimate.fee;
const fees: number[] = estimate.fees;
const quantizationMask: number = estimate.quantization_mask;
return new FeeEstimate(fee, fees, quantizationMask);
}

View file

@ -22,15 +22,15 @@ export class HardForkInfo {
}
public static parse(hardForkInfo: any): HardForkInfo {
const earliestHeight = hardForkInfo.earliest_height;
const enabled = hardForkInfo.enabled;
const state = hardForkInfo.state;
const threshold = hardForkInfo.threshold;
const topHash = hardForkInfo.top_hash;
const version = hardForkInfo.version;
const votes = hardForkInfo.votes;
const voting = hardForkInfo.voting;
const window = hardForkInfo.window;
const earliestHeight: number = hardForkInfo.earliest_height;
const enabled: boolean = hardForkInfo.enabled;
const state: number = hardForkInfo.state;
const threshold: number = hardForkInfo.threshold;
const topHash: string = hardForkInfo.top_hash;
const version: number = hardForkInfo.version;
const votes: number = hardForkInfo.votes;
const voting: number = hardForkInfo.voting;
const window: number = hardForkInfo.window;
return new HardForkInfo(earliestHeight, enabled, state, threshold, topHash, version, votes, voting, window);
}

View file

@ -12,10 +12,10 @@ export class HistogramEntry {
}
public static parse(entry: any) {
const amount = entry.amount;
const totalInstances = entry.total_instances;
const unlockedInstances = entry.unlocked_instances;
const recentInstances = entry.recent_instances;
const amount: number = entry.amount;
const totalInstances: number = entry.total_instances;
const unlockedInstances: number = entry.unlocked_instances;
const recentInstances: number = entry.recent_instances;
return new HistogramEntry(amount, totalInstances, unlockedInstances, recentInstances);
}

View file

@ -22,14 +22,21 @@ export class MinerData {
}
public static parse(minerData: any): MinerData {
const majorVersion = minerData.major_version;
const height = minerData.height;
const prevId = minerData.prev_id;
const seedHash = minerData.seed_hash;
const difficulty = minerData.difficulty;
const medianWeight = minerData.median_weight;
const alreadyGeneratedCoins = minerData.already_generated_coins;
const txBacklog = minerData.tx_backlog;
const majorVersion: number = minerData.major_version;
const height: number = minerData.height;
const prevId: string = minerData.prev_id;
const seedHash: string = minerData.seed_hash;
const difficulty: number = minerData.difficulty;
const medianWeight: number = minerData.median_weight;
const alreadyGeneratedCoins: number = minerData.already_generated_coins;
const _txBacklog: any[] | undefined = minerData.tx_backlog;
const txBacklog: MineableTxBacklog[] = [];
if (_txBacklog) {
_txBacklog.forEach((txb: any) => {
txBacklog.push(MineableTxBacklog.parse(txb));
});
}
return new MinerData(majorVersion, height, prevId, seedHash, difficulty, medianWeight, alreadyGeneratedCoins, txBacklog);
}

View file

@ -16,12 +16,12 @@ export class MinerTx {
}
public static parse(minerTx: any): MinerTx {
const version = minerTx.version;
const unlockTime = minerTx.unlock_time;
const version: number = minerTx.version;
const unlockTime: number = minerTx.unlock_time;
const _vin: any[] | undefined = minerTx.vin;
const _vout: any[] | undefined = minerTx.vout;
const extra = minerTx.extra;
let rctSignatures;
const extra: number[] = minerTx.extra;
let rctSignatures: RctSignatures | undefined = undefined;
if (minerTx.rct_signatures) {
rctSignatures = RctSignatures.parse(minerTx.rct_signatures);
@ -58,7 +58,7 @@ export class TxInputGen {
}
public static parse(gen: any): TxInputGen {
const height = gen.height;
const height: number = gen.height;
return new TxInputGen(height);
}
@ -74,8 +74,8 @@ export class TxOutput {
}
public static parse(out: any): TxOutput {
const amount = out.amount;
const target = TxOutputTarget.parse(out.target);
const amount: number = out.amount;
const target: TxOutputTarget = TxOutputTarget.parse(out.target);
return new TxOutput(amount, target);
}
@ -90,7 +90,7 @@ export class RctSignatures {
}
public static parse(rctSignatures: any): RctSignatures {
const type = rctSignatures.type;
const type: number = rctSignatures.type;
return new RctSignatures(type);
}
@ -107,8 +107,8 @@ export class TxOutputTarget {
}
public static parse(target: any): TxOutputTarget {
const viewKey = target.view_key ? target.view_key : '';
const viewTag = target.view_tag ? target.view_tag : '';
const viewKey: string = target.view_key ? target.view_key : '';
const viewTag: string = target.view_tag ? target.view_tag : '';
return new TxOutputTarget(viewKey, viewTag);
}

View file

@ -47,21 +47,36 @@ export class MiningStatus {
}
public static parse(miningStatus: any): MiningStatus {
return new MiningStatus(
miningStatus.active,
miningStatus.address,
miningStatus.bg_idle_threshold,
miningStatus.bg_min_idle_seconds,
miningStatus.bg_target,
miningStatus.block_reward,
miningStatus.block_target,
miningStatus.difficulty,
miningStatus.difficulty_top64,
miningStatus.is_background_mining_enabled,
miningStatus.pow_algorithm,
miningStatus.speed,
miningStatus.threads_count,
miningStatus.wide_difficulty
const active: boolean = miningStatus.active;
const address: string = miningStatus.address;
const bgIdleThreshold: number = miningStatus.bg_idle_threshold;
const bgMinIdleSeconds: number = miningStatus.bg_min_idle_seconds;
const bgTarget: number = miningStatus.bg_target;
const blockReward: number = miningStatus.block_reward;
const blockTarget: number = miningStatus.block_target;
const difficulty: number = miningStatus.difficulty;
const difficultyTop64: number = miningStatus.difficulty_top64;
const isBackgroundMiningEnabled: boolean = miningStatus.is_background_mining_enabled;
const powAlgorithm: string = miningStatus.pow_algorithm;
const speed: number = miningStatus.speed;
const threadsCount: number = miningStatus.threads_count;
const wideDifficulty: string = miningStatus.wide_difficulty;
return new MiningStatus(
active,
address,
bgIdleThreshold,
bgMinIdleSeconds,
bgTarget,
blockReward,
blockTarget,
difficulty,
difficultyTop64,
isBackgroundMiningEnabled,
powAlgorithm,
speed,
threadsCount,
wideDifficulty
);
}
}

View file

@ -12,10 +12,10 @@ export class NetStats {
}
public static parse(netStats: any): NetStats {
const startTime = netStats.start_time;
const totalPacketsIn = netStats.total_packets_in;
const totalBytesIn = netStats.total_bytes_in;
const totalBytesOut = netStats.total_bytes_out;
const startTime: number = netStats.start_time;
const totalPacketsIn: number = netStats.total_packets_in;
const totalBytesIn: number = netStats.total_bytes_in;
const totalBytesOut: number = netStats.total_bytes_out;
return new NetStats(startTime, totalPacketsIn, totalBytesIn, totalBytesOut);
}

View file

@ -15,11 +15,11 @@ export class OutKey {
}
public static parse(outkey: any): OutKey {
const height = outkey.height;
const key = outkey.key;
const mask = outkey.mask;
const txId = outkey.txid;
const unlocked = outkey.unlocked;
const height: number = outkey.height;
const key: string = outkey.key;
const mask: string = outkey.mask;
const txId: string = outkey.txid;
const unlocked: boolean = outkey.unlocked;
return new OutKey(height, key, mask, txId, unlocked);
}

View file

@ -15,6 +15,9 @@ export class Output {
}
public static parse(out: any): Output {
return new Output(out.amount, out.index);
const amount: number = out.amount;
const index: number = out.index;
return new Output(amount, index);
}
}

View file

@ -12,11 +12,11 @@ export class OutputDistribution {
}
public static parse(outDistribution: any): OutputDistribution {
const amount = outDistribution.amount;
const base = outDistribution.base;
const startHeight = outDistribution.start_height;
const distribution = outDistribution.distribution;
const amount: number = outDistribution.amount;
const base: number = outDistribution.base;
const startHeight: number = outDistribution.start_height;
const distribution: number[] = outDistribution.distribution;
return new OutputDistribution(amount, base, startHeight, distribution);
return new OutputDistribution(amount, base, distribution, startHeight);
}
}

View file

@ -16,11 +16,11 @@ export class PeerInfo {
}
public static parse(peerInfo: any, type: 'white' | 'gray'): PeerInfo {
const host = peerInfo.host;
const id = peerInfo.id;
const ip = peerInfo.ip;
const lastSeen = peerInfo.last_seen;
const port = peerInfo.port;
const host: number = peerInfo.host;
const id: string = peerInfo.id;
const ip: number = peerInfo.ip;
const lastSeen: number = peerInfo.last_seen;
const port: number = peerInfo.port;
return new PeerInfo(type, host, id, ip, lastSeen, port);
}

View file

@ -19,10 +19,10 @@ export class PublicNode {
}
public static parse(publicNode: any, nodeType: 'white' | 'gray'): PublicNode {
const host = publicNode.host;
const lastSeen = publicNode.last_seen;
const rpcCreditsPerHash = publicNode.rpc_credits_per_hash;
const rpcPort = publicNode.rpc_port;
const host: string = publicNode.host;
const lastSeen: number = publicNode.last_seen;
const rpcCreditsPerHash: number = publicNode.rpc_credits_per_hash;
const rpcPort: number = publicNode.rpc_port;
return new PublicNode(nodeType, host, lastSeen, rpcCreditsPerHash, rpcPort);
}

View file

@ -36,7 +36,7 @@ export class Span {
const remoteAddress: string = span.remote_address;
const size: number = span.size;
const speed: number = span.speed;
const startBlockHeight = span.start_block_height;
const startBlockHeight: number = span.start_block_height;
return new Span(connectionId, nBlocks, rate, remoteAddress, size, speed, startBlockHeight);
}

View file

@ -8,8 +8,12 @@ export class SpentKeyImage {
}
public static parse(spentKeyImage: any): SpentKeyImage {
const idHash = spentKeyImage.id_hash;
const txsHashes = spentKeyImage.txs_hashes;
const idHash: string = spentKeyImage.id_hash;
const txsHashes: string[] = spentKeyImage.txs_hashes;
if (!Array.isArray(txsHashes)) {
throw new Error(`Could not parse spent key image object`);
}
return new SpentKeyImage(idHash, txsHashes);
}

View file

@ -19,10 +19,10 @@ export class SyncInfo {
}
public static parse(syncInfo: any): SyncInfo {
const height = syncInfo.height;
const targetHeight = syncInfo.target_height;
const nextNeededPruningSeed = syncInfo.next_needed_pruning_seed;
const overview = syncInfo.overview;
const height: number = syncInfo.height;
const targetHeight: number = syncInfo.target_height;
const nextNeededPruningSeed: number = syncInfo.next_needed_pruning_seed;
const overview: string = syncInfo.overview;
const peers: Peer[] = [];
const spans: Span[] = [];
const rawPeers: any[] = syncInfo.peers;

View file

@ -10,7 +10,7 @@ export class TxBacklogEntry {
}
public static fromBinary(binary: string): TxBacklogEntry[] {
throw new Error("TxBacklogEntry.fromBinary(): not implemented");
console.debug(binary);
throw new Error("TxBacklogEntry.fromBinary(): not implemented");
}
}

View file

@ -35,18 +35,29 @@ export class TxInfo {
}
public static parse(txInfo: any): TxInfo {
return new TxInfo(
txInfo.double_spend,
txInfo.fee_too_low,
txInfo.invalid_input,
txInfo.invalid_output,
txInfo.low_mixin,
txInfo.not_rct,
txInfo.not_relayed,
txInfo.overspend,
txInfo.reason,
txInfo.too_big
);
const doubleSpend: boolean = txInfo.double_spend;
const feeTooLow: boolean = txInfo.fee_too_low;
const invalidInput: boolean = txInfo.invalid_input;
const invalidOutput: boolean = txInfo.invalid_output;
const lowMixin: boolean = txInfo.low_mixin;
const notRct: boolean = txInfo.not_rct;
const notRelayed: boolean = txInfo.not_relayed;
const overspend: boolean = txInfo.overspend;
const reason: string = txInfo.reason;
const tooBig: boolean = txInfo.too_big;
return new TxInfo(
doubleSpend,
feeTooLow,
invalidInput,
invalidOutput,
lowMixin,
notRct,
notRelayed,
overspend,
reason,
tooBig
);
}
}

View file

@ -49,20 +49,20 @@ export class UnconfirmedTx {
}
public static parse(unconfirmedTx: any): UnconfirmedTx {
const blobSize = unconfirmedTx.blob_size;
const doNotRelay = unconfirmedTx.do_not_relay;
const doubleSpendSeen = unconfirmedTx.double_spend_seen;
const fee = unconfirmedTx.fee;
const idHash = unconfirmedTx.id_hash;
const keptByBlock = unconfirmedTx.kept_by_block;
const lastFailedHeight = unconfirmedTx.last_failed_height;
const lastFailedIdHash = unconfirmedTx.last_failed_id_hash;
const lastRelayedTime = unconfirmedTx.last_relayed_time;
const maxUsedBlockHeight = unconfirmedTx.max_used_block_height;
const maxUsedBlockIdHash = unconfirmedTx.max_used_block_id_hash;
const receiveTime = unconfirmedTx.receive_time;
const relayed = unconfirmedTx.relayed;
const txBlob = unconfirmedTx.tx_blob;
const blobSize: number = unconfirmedTx.blob_size;
const doNotRelay: boolean = unconfirmedTx.do_not_relay;
const doubleSpendSeen: boolean = unconfirmedTx.double_spend_seen;
const fee: number = unconfirmedTx.fee;
const idHash: string = unconfirmedTx.id_hash;
const keptByBlock: boolean = unconfirmedTx.kept_by_block;
const lastFailedHeight: number = unconfirmedTx.last_failed_height;
const lastFailedIdHash: string = unconfirmedTx.last_failed_id_hash;
const lastRelayedTime: number = unconfirmedTx.last_relayed_time;
const maxUsedBlockHeight: number = unconfirmedTx.max_used_block_height;
const maxUsedBlockIdHash: string = unconfirmedTx.max_used_block_id_hash;
const receiveTime: number = unconfirmedTx.receive_time;
const relayed: boolean = unconfirmedTx.relayed;
const txBlob: string = unconfirmedTx.tx_blob;
return new UnconfirmedTx(
blobSize, doNotRelay, doubleSpendSeen, fee, idHash, keptByBlock,

View file

@ -16,12 +16,12 @@ export class UpdateInfo {
}
public static parse(info: any): UpdateInfo {
const autoUri = info.auto_uri;
const hash = info.hash;
const path = info.path;
const update = info.update;
const userUri = info.user_uri;
const version = info.version;
const autoUri: string = info.auto_uri;
const hash: string = info.hash;
const path: string = info.path;
const update: boolean = info.update;
const userUri: string = info.user_uri;
const version: string = info.version;
return new UpdateInfo(autoUri, hash, path, update, userUri, version);
}

View file

@ -1,7 +1,7 @@
import { UpdateRequest } from "./UpdateRequest";
export class CheckUpdateRequest extends UpdateRequest {
public override readonly command: "check" = "check";
public override readonly command: "download" | "check" = "check";
constructor() {
super("check", '');

View file

@ -2,7 +2,7 @@ import { UpdateRequest } from "./UpdateRequest";
export class DownloadUpdateRequest extends UpdateRequest {
public override readonly command: "download" = "download";
public override readonly command: "download" | "check" = "download";
constructor(path: string = '') {
super("download", path);

View file

@ -1,8 +1,8 @@
import { RPCRequest } from "./RPCRequest";
export class GetAltBlockHashesRequest extends RPCRequest {
public override readonly method: 'get_alt_block_hashes' = 'get_alt_block_hashes';
public override readonly restricted: false = false;
public override readonly method: string = 'get_alt_block_hashes';
public override readonly restricted: boolean = false;
constructor() {
super();

View file

@ -37,7 +37,7 @@ export class GetBlockRequest extends JsonRPCRequest {
public override toDictionary(): { [key: string]: any; } {
const dict = super.toDictionary();
let params: { [key: string]: any } = { 'fill_pow_hash': this.fillPoWHash };
const params: { [key: string]: any } = { 'fill_pow_hash': this.fillPoWHash };
if (this.byHeight) {
params['height'] = this.height;

View file

@ -1,7 +1,7 @@
import { RPCRequest } from "./RPCRequest";
export class GetNetStatsRequest extends RPCRequest {
public override readonly method: 'get_net_stats' = 'get_net_stats';
public override readonly method: string = 'get_net_stats';
public override readonly restricted: boolean = false;
constructor() {

View file

@ -1,7 +1,7 @@
import { RPCRequest } from "./RPCRequest";
export class GetPeerListRequest extends RPCRequest {
public override readonly method: 'get_peer_list' = 'get_peer_list';
public override readonly method: string = 'get_peer_list';
public override readonly restricted: boolean = true;
public override toDictionary(): { [key: string]: any; } {

View file

@ -1,7 +1,7 @@
import { RPCRequest } from "./RPCRequest";
export class GetPublicNodesRequest extends RPCRequest {
public override readonly method: 'get_public_nodes' = 'get_public_nodes';
public override readonly method: string = 'get_public_nodes';
public override readonly restricted: boolean = false;
public readonly whites: boolean;

View file

@ -1,7 +1,7 @@
import { RPCBinaryRequest } from "./RPCBinaryRequest";
export class GetTransactionPoolHashesBinaryRequest extends RPCBinaryRequest {
public override readonly method: 'get_transaction_pool_hashes.bin' = 'get_transaction_pool_hashes.bin';
public override readonly method: string = 'get_transaction_pool_hashes.bin';
public override readonly restricted: boolean = false;
constructor() {

View file

@ -1,7 +1,7 @@
import { RPCRequest } from "./RPCRequest";
export class GetTransactionPoolHashesRequest extends RPCRequest {
public override readonly method: 'get_transaction_pool_hashes' = 'get_transaction_pool_hashes';
public override readonly method: string = 'get_transaction_pool_hashes';
public override readonly restricted: boolean = false;
constructor() {

View file

@ -1,7 +1,7 @@
import { RPCRequest } from "./RPCRequest";
export class GetTransactionPoolRequest extends RPCRequest {
public override readonly method: 'get_transaction_pool' = 'get_transaction_pool';
public override readonly method: string = 'get_transaction_pool';
public override readonly restricted: boolean = false;
public override toDictionary(): { [key: string]: any; } {

View file

@ -1,8 +1,8 @@
import { RPCRequest } from "./RPCRequest";
export class InPeersRequest extends RPCRequest {
public override readonly method: 'in_peers' = 'in_peers';
public override readonly restricted: false = false;
public override readonly method: string = 'in_peers';
public override readonly restricted: boolean = false;
public readonly inPeers: number;

View file

@ -1,8 +1,8 @@
import { RPCRequest } from "./RPCRequest";
export class IsKeyImageSpentRequest extends RPCRequest {
public override readonly method: 'is_key_image_spent' = 'is_key_image_spent';
public override readonly restricted: false = false;
public override readonly method: string = 'is_key_image_spent';
public override readonly restricted: boolean = false;
public readonly keyImages: string[];

View file

@ -1,8 +1,8 @@
import { RPCRequest } from "./RPCRequest";
export class MiningStatusRequest extends RPCRequest {
public override readonly method: 'mining_status' = 'mining_status';
public override readonly restricted: true = true;
public override readonly method: string = 'mining_status';
public override readonly restricted: boolean = true;
constructor() {
super();

View file

@ -1,8 +1,8 @@
import { RPCRequest } from "./RPCRequest";
export class OutPeersRequest extends RPCRequest {
public override readonly method: 'out_peers' = 'out_peers';
public override readonly restricted: false = false;
public override readonly method: string = 'out_peers';
public override readonly restricted: boolean = false;
public readonly outPeers: number;

View file

@ -1,8 +1,8 @@
import { RPCRequest } from "./RPCRequest";
export class SaveBcRequest extends RPCRequest {
public override readonly method: 'save_bc' = 'save_bc';
public override readonly restricted: true = true;
public override readonly method: string = 'save_bc';
public override readonly restricted: boolean = true;
constructor() {
super();

View file

@ -1,8 +1,8 @@
import { RPCRequest } from "./RPCRequest";
export class SendRawTransactionRequest extends RPCRequest {
public override readonly method: 'send_raw_transaction' = 'send_raw_transaction';
public override readonly restricted: false = false;
public override readonly method: string = 'send_raw_transaction';
public override readonly restricted: boolean = false;
public readonly txAsHex: string;
public readonly doNotRelay: boolean;

View file

@ -1,8 +1,8 @@
import { RPCRequest } from "./RPCRequest";
export class SetBootstrapDaemonRequest extends RPCRequest {
public override readonly method: 'set_bootstrap_daemon' = 'set_bootstrap_daemon';
public override readonly restricted: true = true;
public override readonly method: string = 'set_bootstrap_daemon';
public override readonly restricted: boolean = true;
public readonly address: string;
public readonly username: string;

View file

@ -1,8 +1,8 @@
import { RPCRequest } from "./RPCRequest"
export class SetLimitRequest extends RPCRequest {
public override readonly method: 'set_limit' = 'set_limit';
public override readonly restricted: true = true;
public override readonly method: string = 'set_limit';
public override readonly restricted: boolean = true;
public readonly limitDown: number;
public readonly limitUp: number;

View file

@ -1,8 +1,8 @@
import { RPCRequest } from "./RPCRequest";
export class SetLogCategoriesRequest extends RPCRequest {
public override readonly method: 'set_log_categories' = 'set_log_categories';
public override readonly restricted: true = true;
public override readonly method: string = 'set_log_categories';
public override readonly restricted: boolean = true;
public readonly categories: string;

View file

@ -1,7 +1,7 @@
import { RPCRequest } from "./RPCRequest";
export class SetLogHashRateRequest extends RPCRequest {
public override readonly method: 'set_log_hash_rate' = 'set_log_hash_rate';
public override readonly method: string = 'set_log_hash_rate';
public override readonly restricted: boolean = true;
public readonly visible: boolean;

View file

@ -1,7 +1,7 @@
import { RPCRequest } from "./RPCRequest";
export class SetLogLevelRequest extends RPCRequest {
public override readonly method: 'set_log_level' = 'set_log_level';
public override readonly method: string = 'set_log_level';
public override readonly restricted: boolean = true;
public readonly level: number;

View file

@ -1,8 +1,8 @@
import { RPCRequest } from "./RPCRequest";
export class StartMiningRequest extends RPCRequest {
public override readonly method: 'start_mining' = 'start_mining';
public override readonly restricted: true = true;
public override readonly method: string = 'start_mining';
public override readonly restricted: boolean = true;
public readonly doBackgroundMining: boolean;
public readonly ignoreBattery: boolean;
public readonly minerAddress: string;

View file

@ -1,8 +1,8 @@
import { RPCRequest } from "./RPCRequest";
export class StopDaemonRequest extends RPCRequest {
public override readonly method: 'stop_daemon' = 'stop_daemon';
public override readonly restricted: true = true;
public override readonly method: string = 'stop_daemon';
public override readonly restricted: boolean = true;
constructor() {
super();

View file

@ -1,8 +1,8 @@
import { RPCRequest } from "./RPCRequest";
export class StopMiningRequest extends RPCRequest {
public override readonly method: 'stop_mining' = 'stop_mining';
public override readonly restricted: true = true;
public override readonly method: string = 'stop_mining';
public override readonly restricted: boolean = true;
constructor() {
super();

View file

@ -11,7 +11,7 @@ export class SubmitBlockRequest extends JsonRPCRequest {
}
public override toDictionary(): { [key: string]: any; } {
let dict = super.toDictionary();
const dict = super.toDictionary();
dict['params'] = this.blockBlobData;

View file

@ -59,6 +59,7 @@ export { SetLogHashRateRequest } from "./SetLogHashRateRequest";
export { SetLogCategoriesRequest } from "./SetLogCategoriesRequest";
export { GetTransactionPoolRequest } from "./GetTransactionPoolRequest";
export { GetPeerListRequest } from "./GetPeerListRequest";
export { GetTransactionsRequest } from "./GetTransactionsRequest";
/**
* Restricted requests

View file

@ -53,10 +53,8 @@ import 'zone.js'; // Included with Angular CLI.
*/
import 'jquery';
import * as $$ from 'jquery';
import * as $ from 'jquery';
import * as bootstrapTable from 'bootstrap-table';
//import 'bootstrap-table';
import 'bootstrap-table';
declare global {
interface Window {
electronAPI: {