Skip to content
Snippets Groups Projects
Commit 3c2c1384 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[fix] Make CLI tests pass

parent cf56f504
No related branches found
No related tags found
No related merge requests found
"use strict" "use strict"
import {DuniterBlockchain} from "../blockchain/DuniterBlockchain" import {DuniterBlockchain} from "../blockchain/DuniterBlockchain";
import {BlockDTO} from "../dto/BlockDTO" import {BlockDTO} from "../dto/BlockDTO";
import {DBTransaction} from "../db/DBTransaction" import {DBTransaction} from "../db/DBTransaction";
import {Indexer} from "../indexer" import {Indexer} from "../indexer";
import {CurrencyConfDTO} from "../dto/ConfDTO" import {CurrencyConfDTO} from "../dto/ConfDTO";
const _ = require('underscore') const _ = require('underscore')
const constants = require('../constants') const constants = require('../constants')
...@@ -243,6 +243,10 @@ export class QuickSynchronizer { ...@@ -243,6 +243,10 @@ export class QuickSynchronizer {
delete sync_memoryWallets[cond] delete sync_memoryWallets[cond]
} }
if (block.number === 0) {
await this.blockchain.saveParametersForRoot(block, this.conf, this.dal)
}
// Last block: cautious mode to trigger all the INDEX expiry mechanisms // Last block: cautious mode to trigger all the INDEX expiry mechanisms
const { index, HEAD } = await DuniterBlockchain.checkBlock(dto, constants.WITH_SIGNATURES_AND_POW, this.conf, this.dal) const { index, HEAD } = await DuniterBlockchain.checkBlock(dto, constants.WITH_SIGNATURES_AND_POW, this.conf, this.dal)
await this.blockchain.pushTheBlock(dto, index, HEAD, this.conf, this.dal, this.logger) await this.blockchain.pushTheBlock(dto, index, HEAD, this.conf, this.dal, this.logger)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment