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
Branches
Tags
No related merge requests found
"use strict"
import {DuniterBlockchain} from "../blockchain/DuniterBlockchain"
import {BlockDTO} from "../dto/BlockDTO"
import {DBTransaction} from "../db/DBTransaction"
import {Indexer} from "../indexer"
import {CurrencyConfDTO} from "../dto/ConfDTO"
import {DuniterBlockchain} from "../blockchain/DuniterBlockchain";
import {BlockDTO} from "../dto/BlockDTO";
import {DBTransaction} from "../db/DBTransaction";
import {Indexer} from "../indexer";
import {CurrencyConfDTO} from "../dto/ConfDTO";
const _ = require('underscore')
const constants = require('../constants')
......@@ -243,6 +243,10 @@ export class QuickSynchronizer {
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
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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment