Skip to content

Commit

Permalink
fix(dashmate): stop fails with mtime not found
Browse files Browse the repository at this point in the history
  • Loading branch information
shumkov committed Dec 18, 2024
1 parent 01a5b7a commit c55d25e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
8 changes: 0 additions & 8 deletions packages/dashmate/src/listr/tasks/resetNodeTaskFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,6 @@ export default function resetNodeTaskFactory(
}
},
},
{
title: 'Reset dashmate\'s ephemeral data',
enabled: (ctx) => !ctx.removeConfig && !ctx.isHardReset && !ctx.isPlatformOnlyReset,
task: () => {
// TODO: We should remove it from config
config.set('core.miner.mediantime', null);
},
},
{
title: `Remove config ${config.getName()}`,
enabled: (ctx) => ctx.removeConfig,
Expand Down
17 changes: 0 additions & 17 deletions packages/dashmate/src/listr/tasks/stopNodeTaskFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,23 +67,6 @@ export default function stopNodeTaskFactory(
host: await getConnectionHost(config, 'core', 'core.rpc.host'),
})),
},
{
title: 'Save core node time',
enabled: () => config.get('group') === 'local',
skip: (ctx) => ctx.isForce,
task: async () => {
const rpcClient = createRpcClient({
port: config.get('core.rpc.port'),
user: 'dashmate',
pass: config.get('core.rpc.users.dashmate.password'),
host: await getConnectionHost(config, 'core', 'core.rpc.host'),
});

const { result: { mediantime } } = await rpcClient.getBlockchainInfo();

config.set('core.miner.mediantime', mediantime);
},
},
{
title: `Stopping ${config.getName()} node`,
task: async (ctx) => {
Expand Down

0 comments on commit c55d25e

Please sign in to comment.