Handle core timeout during closed channel scan, using correct config variable
This commit is contained in:
parent
6a52725b63
commit
2a6f48d8c8
@ -315,7 +315,6 @@ class ChannelsApi {
|
|||||||
const policy1: Partial<ILightningApi.RoutingPolicy> = channel.node1_policy || {};
|
const policy1: Partial<ILightningApi.RoutingPolicy> = channel.node1_policy || {};
|
||||||
const policy2: Partial<ILightningApi.RoutingPolicy> = channel.node2_policy || {};
|
const policy2: Partial<ILightningApi.RoutingPolicy> = channel.node2_policy || {};
|
||||||
|
|
||||||
try {
|
|
||||||
const query = `INSERT INTO channels
|
const query = `INSERT INTO channels
|
||||||
(
|
(
|
||||||
id,
|
id,
|
||||||
@ -407,9 +406,6 @@ class ChannelsApi {
|
|||||||
policy2.min_htlc,
|
policy2.min_htlc,
|
||||||
Common.utcDateToMysql(policy2.last_update)
|
Common.utcDateToMysql(policy2.last_update)
|
||||||
]);
|
]);
|
||||||
} catch (e) {
|
|
||||||
logger.err('$saveChannel() error: ' + (e instanceof Error ? e.message : e));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -49,7 +49,7 @@ class NetworkSyncService {
|
|||||||
logger.err('$runTasks() error: ' + (e instanceof Error ? e.message : e));
|
logger.err('$runTasks() error: ' + (e instanceof Error ? e.message : e));
|
||||||
}
|
}
|
||||||
|
|
||||||
setTimeout(() => { this.$runTasks(); }, 1000 * config.LIGHTNING.STATS_REFRESH_INTERVAL);
|
setTimeout(() => { this.$runTasks(); }, 1000 * config.LIGHTNING.GRAPH_REFRESH_INTERVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -84,6 +84,7 @@ class NetworkSyncService {
|
|||||||
* Update the `channels` table to reflect the current network graph state
|
* Update the `channels` table to reflect the current network graph state
|
||||||
*/
|
*/
|
||||||
private async $updateChannelsList(channels: ILightningApi.Channel[]): Promise<void> {
|
private async $updateChannelsList(channels: ILightningApi.Channel[]): Promise<void> {
|
||||||
|
try {
|
||||||
let progress = 0;
|
let progress = 0;
|
||||||
|
|
||||||
const graphChannelsIds: string[] = [];
|
const graphChannelsIds: string[] = [];
|
||||||
@ -103,6 +104,9 @@ class NetworkSyncService {
|
|||||||
|
|
||||||
// If a channel if not present in the graph, mark it as inactive
|
// If a channel if not present in the graph, mark it as inactive
|
||||||
channelsApi.$setChannelsInactive(graphChannelsIds);
|
channelsApi.$setChannelsInactive(graphChannelsIds);
|
||||||
|
} catch (e) {
|
||||||
|
logger.err(`Cannot update channel list. Reason: ${(e instanceof Error ? e.message : e)}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// This method look up the creation date of the earliest channel of the node
|
// This method look up the creation date of the earliest channel of the node
|
||||||
|
Loading…
x
Reference in New Issue
Block a user