Mise à jour de GitLab prévue ce samedi 8 mai 2021 à partir de 9h00 CET | GitLab upgrade planned this Saturday May 4th of 2021 from 9:00 AM CET

Commit 60141655 authored by Cédric Moreau's avatar Cédric Moreau

Accepting new block: apply local rules

parent f646bdf3
......@@ -8,6 +8,7 @@ var parsers = require('../lib/streams/parsers/doc');
var logger = require('../lib/logger')('blockchain');
var signature = require('../lib/signature');
var constants = require('../lib/constants');
var validator = require('../lib/localValidator');
var moment = require('moment');
var inquirer = require('inquirer');
......@@ -96,6 +97,12 @@ function BlockchainService (conn, conf, IdentityService, PeeringService) {
var newLinks;
async.waterfall([
function (next){
validator().validate(block, next);
},
function (validated, next){
validator().checkSignatures(block, next);
},
function (validated, next){
Block.current(function (err, obj) {
next(null, obj || null);
})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment