Skip to content

Commit

Permalink
Build 1.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
emiliorizzo committed Mar 5, 2020
1 parent 437ed1f commit 4aeffff
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 35 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## [1.0.5] - 2019-03-05

### Fixed

- Blocks service: Db error on the first run
- Errors when running against a regtest node

### Changed

- Docker: expose api documentation

## [1.0.4] - 2019-02-27

### Added
Expand Down
9 changes: 7 additions & 2 deletions dist/services/blocks/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"use strict";var _path = _interopRequireDefault(require("path"));
"use strict";Object.defineProperty(exports, "__esModule", { value: true });exports.setupBlocks = setupBlocks;var _path = _interopRequireDefault(require("path"));
var _child_process = require("child_process");
var _config = _interopRequireDefault(require("../../lib/config"));
var _Logger = _interopRequireDefault(require("../../lib/Logger"));
Expand All @@ -13,9 +13,14 @@ config.log = log;

startBlocks();

async function startBlocks() {
async function setupBlocks() {
const setup = await (0, _Setup.default)({ log });
await setup.createCollections();
return setup;
}

async function startBlocks() {
const setup = await setupBlocks();
const { db, initConfig } = await setup.start();
config.initConfig = initConfig;
const Status = new _BlocksStatus.BlocksStatus(db, config);
Expand Down
8 changes: 8 additions & 0 deletions dist/services/blocks/setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
"use strict";var _index = require("./index.js");

(0, _index.setupBlocks)().then(() => {
process.exit(0);
}).catch(err => {
console.log(err);
process.exit(9);
});
1 change: 1 addition & 0 deletions dist/services/classes/CheckBlocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ class CheckBlocks extends _BlocksBase.BlocksBase {
}

getBlocks(check) {
check = check || {};
try {
let segments = check.missingSegments || [];
let invalid = check.invalid || [];
Expand Down
2 changes: 1 addition & 1 deletion dist/services/userEvents/ContractVerifierModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var _mongodb = require("mongodb");function _interopRequireDefault(obj) {return o

const versionsId = '_contractVerifierVersions';exports.versionsId = versionsId;

function ContractVerifierModule(db, collections, { url }, { log }) {
function ContractVerifierModule(db, collections, { url } = {}, { log } = {}) {
log = log || console;
const storedConfig = (0, _StoredConfig.StoredConfig)(db);
const socket = _socket.default.connect(url, { reconnect: true });
Expand Down
70 changes: 40 additions & 30 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rsk-explorer-api",
"version": "1.0.4",
"version": "1.0.5",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion public/swagger.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"info": {
"title": "rsk-explorer-api",
"version": "1.0.4",
"version": "1.0.5",
"description": "explorer API Documentation"
},
"swagger": "2.0",
Expand Down

0 comments on commit 4aeffff

Please sign in to comment.