fixing empty transaction

This commit is contained in:
2026-08-16 19:44:30 +00:00
parent a85647572a
commit 9e23b248e5
7 changed files with 357 additions and 63 deletions

View File

@@ -146,6 +146,21 @@ export class InfluxMetricsProvider implements IMetricsProvider {
this.writePoint(p);
}
recordWalletState(wallet: string, isHot: boolean): void {
const p = new Point('wallet_state').tag('wallet', wallet).intField('is_hot', isHot ? 1 : 0);
this.writePoint(p);
}
recordWalletIncomingRate(wallet: string, rate: number): void {
const p = new Point('wallet_incoming_rate').tag('wallet', wallet).floatField('rate', rate);
this.writePoint(p);
}
recordWalletProcessedRate(wallet: string, rate: number): void {
const p = new Point('wallet_processed_rate').tag('wallet', wallet).floatField('rate', rate);
this.writePoint(p);
}
async close(): Promise<void> {
if (this.writeApi) {
logger.info('Closing InfluxDB metrics writer...');
@@ -180,4 +195,7 @@ export class MockMetricsProvider implements IMetricsProvider {
recordRpcRequestRate(_requestsPerSecond: number): void {}
recordQueueProcessed(_wallet: string): void {}
recordRpcFetchError(_wallet: string): void {}
recordWalletState(_wallet: string, _isHot: boolean): void {}
recordWalletIncomingRate(_wallet: string, _rate: number): void {}
recordWalletProcessedRate(_wallet: string, _rate: number): void {}
}