Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix broken references to plugin docs #2263

Closed
wants to merge 85 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
57374e6
refactor: move core-api repositories into core-database-* (#2107)
paroxysm Feb 20, 2019
187993d
feat: implement AIP29 (#2122)
spkjp Feb 20, 2019
1c64f51
Merge branch 'develop' into 2.3
faustbrian Feb 21, 2019
cc10cf6
refactor(core-webhooks): replace sqlite3 with lowdb (#2124)
faustbrian Feb 21, 2019
fc69339
fix(core-elasticsearch): build failure (#2127)
spkjp Feb 21, 2019
6a914c2
test(core-database): add tests to blocks & transactions business repo…
paroxysm Feb 25, 2019
e406317
Merge remote-tracking branch 'origin/develop' into 2.3
spkjp Feb 25, 2019
528dc1e
Merge pull request #2157 from supaiku0/merge-develop
faustbrian Feb 26, 2019
fd70671
perf(crypto): integrate bcrypto (#2158)
spkjp Feb 26, 2019
be50e96
feat(core-logger-pino): initial implementation (#2134)
faustbrian Feb 26, 2019
e194ac6
feat(core-api): search delegates by usernames (#2143)
dated Feb 26, 2019
66b3a28
feat(crypto): increase vendor field length to 255 bytes (#2159)
spkjp Feb 26, 2019
1c47fa2
refactor: replace micromatch with nanomatch and remove heavy deps (#2…
faustbrian Feb 26, 2019
3449c6f
refactor(crypto): benchmarks (#2167)
spkjp Feb 27, 2019
358c312
chore: move core-graphql to the deprecated folder (#2169)
faustbrian Feb 27, 2019
a823c32
test: initial restructure & split of unit and integration tests (#2172)
air1one Feb 27, 2019
44b6ed9
refactor: replace dayjs-ext with dato (#2168)
faustbrian Feb 27, 2019
379522b
refactor: peg block timestamp to slot (#2176)
spkjp Feb 28, 2019
0875de6
chore: circleci update coverage directory (#2177)
air1one Feb 28, 2019
eaf4fe1
chore: remove extraneous jest presets and config (#2182)
faustbrian Feb 28, 2019
bdd07d3
refactor(core-tester-cli): rewrite from scratch (#2133)
faustbrian Feb 28, 2019
a986cb8
refactor(crypto): de/serialization (#2175)
spkjp Mar 1, 2019
317e86e
refactor: move transaction logic out of crypto (#2188)
spkjp Mar 2, 2019
cf781a1
feat(core-tester-cli): test the vendor field (#2189)
faustbrian Mar 3, 2019
8a95e95
feat(core-tester-cli): add the ability to send multiple waves (#2191)
faustbrian Mar 3, 2019
4e2c3f2
feat(core): add support for reinstalling the current version (#2192)
faustbrian Mar 3, 2019
5bfc691
feat(core): add support for forced updates (#2190)
faustbrian Mar 3, 2019
5ca3939
Merge branch 'develop' into 2.3
faustbrian Mar 4, 2019
88ff072
style: apply prettier formatting
faustbrian Mar 4, 2019
f89ebe4
test(core-container): remove old test
faustbrian Mar 4, 2019
dbe205c
Merge pull request #2198 from ArkEcosystem/2.3
faustbrian Mar 4, 2019
3377337
feat(core-api): more params for delegates search endpoint (#2184)
dated Mar 6, 2019
ea06ba4
fix(core-tester-cli): set crypto network for debug commands (#2204)
faustbrian Mar 6, 2019
7889947
feat(core-api): add active delegates endpoint (#2205)
dated Mar 6, 2019
9e253bd
refactor: move transaction type specific logic into core-transactions…
spkjp Mar 7, 2019
62aeb20
fix: vote balance update (develop) (#2211)
spkjp Mar 8, 2019
d00d471
refactor(core-blockchain): remove old fast rebuild code (#2210)
faustbrian Mar 8, 2019
477db4c
refactor: purely rely on in-memory wallets based on transactions (#2209)
faustbrian Mar 8, 2019
0479d01
test: remove integration setup & tests from unit tests (#2194)
faustbrian Mar 8, 2019
183eab1
fix(core-tester-cli): Fix the description of debug:serialize
vasild Mar 8, 2019
ae3c428
feat(core): add restart flags to update command (#2218)
dated Mar 11, 2019
e731c8f
chore: circleci restore caching + re-organize jobs for unit / integra…
air1one Mar 11, 2019
e60a378
Merge remote-tracking branch 'origin/master' into merge
spkjp Mar 11, 2019
4ce1636
chore: bump versions
spkjp Mar 11, 2019
9e7ea5e
chore: yarn.lock
spkjp Mar 11, 2019
45d33d7
fix: resolve core-tester-utils conflicts and various errors
faustbrian Mar 11, 2019
d5358f9
chore: use yarn setup on CircleCI
faustbrian Mar 11, 2019
565fbd8
chore: update CircleCI config
faustbrian Mar 11, 2019
b0b0c10
chore: merge master into develop
faustbrian Mar 11, 2019
9ee8adb
fix(core-tester-cli): Don't hide errors from HTTP failures (#2223)
vasild Mar 11, 2019
f0fa7e8
chore: update dependencies and remove unused imports (#2212)
faustbrian Mar 11, 2019
34d43b4
refactor: replace axios with got (#2203)
faustbrian Mar 12, 2019
9ca8f61
feat(core-tester-cli): add make:block command (#2221)
faustbrian Mar 12, 2019
c123959
fix(core-api): properly sort semver versions (#2229)
luciorubeens Mar 12, 2019
eb6b092
refactor(core-forger): always use latest available height (#2231)
spkjp Mar 12, 2019
1e42dc1
fix: keep old vendor field padding (#2233)
spkjp Mar 13, 2019
8ce224a
fix: properly cast Buffer to hex string (#2232)
spkjp Mar 13, 2019
6012203
feat(crypto): Switch block id to full SHA256 (#2156)
vasild Mar 13, 2019
db0d2d0
fix(crypto): Only use toBytesHex() for old block ids
vasild Mar 13, 2019
0d4e162
test(core-forger): Extend tests with a block with full sha256 id (#2235)
vasild Mar 13, 2019
91a5e71
Merge branch 'develop' into fix-usage-of-toBytesHex
faustbrian Mar 13, 2019
e607f7a
refactor: move wallet class out of crypto (#2237)
spkjp Mar 14, 2019
3be82e8
feat(core-database-postgres): transaction asset column (#2236)
spkjp Mar 14, 2019
d841953
docs: less noise in the GitHub PR template (#2238)
faustbrian Mar 14, 2019
c7d5b8c
chore(core): Disable webhooks on testnet (#2239)
vasild Mar 14, 2019
00b4815
chore: add publish scripts for npm (#2240)
faustbrian Mar 14, 2019
ebc8faa
chore: remove unused typedoc dependency (#2241)
faustbrian Mar 14, 2019
d398f32
chore: setup linting for tests (#2242)
faustbrian Mar 14, 2019
b6bfc0f
chore: add update script for dependencies (#2244)
faustbrian Mar 14, 2019
bda844d
chore: remove pretest and lint scripts from packages (#2243)
faustbrian Mar 14, 2019
fca6888
fix(tests): Reference the home directory via HOME, not ~ (#2246)
vasild Mar 15, 2019
eaf7bcd
refactor: custom transaction types (#2247)
spkjp Mar 16, 2019
1194ebc
fix(core-database): return array instead of joined string from applyO…
dated Mar 16, 2019
69ec84e
chore: add publish script for the next channel (#2249)
faustbrian Mar 18, 2019
99dc9d0
feat(core): support for the next channel (#2250)
faustbrian Mar 18, 2019
ddcd27c
fix(core-webhooks): return an empty array if no webhooks exist for a …
faustbrian Mar 18, 2019
51176e9
test(core-webhooks): unit test the database (#2253)
faustbrian Mar 18, 2019
264bd69
docs: initial 2.3.0 changelog (#2255)
faustbrian Mar 18, 2019
7a1ccd6
chore: remove packages from codecov ignore list (#2256)
faustbrian Mar 18, 2019
0288158
refactor: remove missed blocks and productivity (#2257)
faustbrian Mar 18, 2019
d7f8351
fix(core-utils): handle NSect edge case (#2259)
vasild Mar 18, 2019
ee4436a
fix(core-blockchain): handle unhandled event (#2260)
spkjp Mar 19, 2019
66bd762
feat(core-logger-pino): set different log levels for console and file…
faustbrian Mar 19, 2019
46093c9
Broken docs links fixed
jamesbooker Mar 19, 2019
395e8c3
Merge branch 'develop' into doc-update-booker
jamesbooker Mar 19, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
306 changes: 91 additions & 215 deletions .circleci/config.yml

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions .circleci/configTemplate.json
Expand Up @@ -65,8 +65,8 @@
},
{
"run": {
"name": "Test",
"command": ""
"name": "Unit tests",
"command": "cd ~/core && yarn test:unit:coverage --coverageDirectory .coverage/unit/ --maxWorkers=2"
}
},
{
Expand Down Expand Up @@ -154,8 +154,8 @@
},
{
"run": {
"name": "Test",
"command": ""
"name": "Unit tests",
"command": "cd ~/core && yarn test:unit:coverage --coverageDirectory .coverage/unit/ --maxWorkers=2"
}
},
{
Expand Down Expand Up @@ -183,7 +183,7 @@
"workflows": {
"version": 2,
"build_and_test": {
"jobs": []
"jobs": ["test-node10-0", "test-node11-0"]
}
}
}
73 changes: 42 additions & 31 deletions .circleci/generateConfig.js
Expand Up @@ -11,48 +11,28 @@ function jason(value) {

fs.readdir("./packages", (_, packages) => {
// test split
const packagesSplit = chunk(packages.sort(), 10);
const packagesChunks = splitPackages(packages);

const resetSqlCommand = "cd ~/core/.circleci && ./rebuild-db.sh"

for (const [name, job] of Object.entries(config.jobs)) {
for (const [name, unitJob] of Object.entries(config.jobs)) {
// save cache
const saveCacheStep = config.jobs[name].steps.find(step => typeof step === "object" && step.save_cache);
const saveCacheStep = unitJob.steps.find(step => typeof step === "object" && step.save_cache);
saveCacheStep.save_cache.paths = packages
.map(package => `./packages/${package}/node_modules`)
.concat("./node_modules");


// copy base unit jobs (unit tests) to adapt for integration tests
const jobs = [
config.jobs[name],
jason(config.jobs[name]),
jason(config.jobs[name]),
jason(unitJob),
jason(unitJob),
];

jobs.forEach((job, index) => {
const testStepIndex = job.steps.findIndex(
step => typeof step === "object" && step.run && step.run.name === "Test",
step => typeof step === "object" && step.run && step.run.name === "Unit tests",
);

const pkgs = packagesSplit[index].map(package => `./packages/${package}/`);

const steps = pkgs
.map(pkg => {
const name = path.basename(pkg);

return {
run: {
name,
command: `${resetSqlCommand} && cd ~/core/packages/${name} && yarn test:coverage`,
},
};
})
.filter(pkg => {
const {
scripts
} = require(path.resolve(__dirname, `../packages/${pkg.run.name}/package.json`));

return Object.keys(scripts).includes("test:coverage");
});
const steps = getIntegrationSteps(packagesChunks[index]);

const stepLog = job.steps[9];
const stepLint = job.steps[10];
Expand All @@ -66,10 +46,41 @@ fs.readdir("./packages", (_, packages) => {
job.steps.push(stepLint);
job.steps.push(stepCoverage);

config.jobs[name.slice(0, -1) + index] = job;
config.workflows.build_and_test.jobs.push(name.slice(0, -1) + index);
config.jobs[name.slice(0, -1) + (index + 1)] = job;
config.workflows.build_and_test.jobs.push(name.slice(0, -1) + (index + 1));
});
}

fs.writeFileSync(".circleci/config.yml", yaml.safeDump(config));
});

function splitPackages(packageNames) {
// split packages in two for integration tests
const integrationPackages = packageNames.sort()
.map(pkg => path.basename(pkg))
.filter(pkg => fs.existsSync(path.resolve(__dirname, `../__tests__/integration/${pkg}`)))

var indexToSplit = Math.floor(integrationPackages.length / 2);
return [
integrationPackages.slice(0, indexToSplit),
integrationPackages.slice(indexToSplit + 1)
]
}

function getIntegrationSteps(packages) {
const resetSqlCommand = "cd ~/core/.circleci && ./rebuild-db.sh"

const steps = []
steps.push(...packages
.filter(pkg => fs.existsSync(path.resolve(__dirname, `../__tests__/integration/${pkg}`)))
.map(pkg => ({
run: {
name: `${pkg} - integration`,
command: `${resetSqlCommand} && cd ~/core && yarn test:coverage /integration/${pkg}/ --coverageDirectory .coverage/integration/${pkg}`,
},
})
)
);

return steps;
}
11 changes: 0 additions & 11 deletions .codecov.yml
Expand Up @@ -2,14 +2,3 @@ ignore:
- "packages/**/src/defaults.ts"
- "packages/**/src/index.ts"
- "packages/**/src/plugin.ts"
- "packages/core-error-tracker-bugsnag/**/*"
- "packages/core-error-tracker-sentry/**/*"
- "packages/core-graphql/**/*"
- "packages/core-http-utils/**/*"
- "packages/core-logger-winston/src/formatter.ts"
- "packages/core-snapshots-cli/**/*"
- "packages/core-test-utils/**/*"
- "packages/core-test-utils/src/fixtures/**/*"
- "packages/core-tester-cli/**/*"
- "packages/core-webhooks/src/database/migrations/**/*"
- "packages/core/**/*"
52 changes: 28 additions & 24 deletions .github/PULL_REQUEST_TEMPLATE.md
@@ -1,35 +1,39 @@
## Proposed changes
<!--
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.
-->
<!-- Please don't delete this template and read our contribution guidelines at https://docs.ark.io/guidebook/contribution-guidelines/contributing.html -->

## Types of changes
<!--
What types of changes does your code introduce?
_Put an `x` in the boxes that apply and remove the rest of them: keep this PR as concise, but descriptive, as possible.._
-->
## Summary

<!-- Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. -->

## What kind of change does this PR introduce?

<!-- _Put an `x` in the boxes that apply. -->

- [ ] Bugfix
- [ ] New feature
- [ ] Refactoring / Performance Improvements
- [ ] Build-related changes
- [ ] Documentation
- [ ] Tests / Continuous Integration
- [ ] Other, please describe:

- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Refactoring (improve a current implementation without adding a new feature or fixing a bug)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Build (changes that affect the build system)
- [ ] Docs (documentation only changes)
- [ ] Test (adding missing tests or fixing existing tests)
- [ ] Other... Please describe:
## Does this PR introduce a breaking change?

<!-- _Put an `x` in the boxes that apply. -->

- [ ] Yes
- [ ] No

## Checklist
<!--
_Put an `x` in the boxes that apply and remove this text and the rest of them. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._
-->

<!-- _Put an `x` in the boxes that apply. -->

- [ ] I have read the [CONTRIBUTING](https://docs.ark.io/guidebook/contribution-guidelines/contributing.html) documentation
- [ ] Lint and unit tests pass locally with my changes
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] I have added necessary documentation (if appropriate)
<!--
- [ ] I have added necessary documentation _(if appropriate)_

## Further comments
## Other information

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...
<!--
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc.
-->
59 changes: 59 additions & 0 deletions CHANGELOG.md
Expand Up @@ -7,6 +7,46 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [2.3.0] - YYYY-MM-DD

### Breaking Changes

- Removed the `wallets` table from the database ([#2209])
- **Core 2.0 has been fully reliant on in-memory wallets since the 2.0 release. This only removes the dumping of wallets into the database as it is wasted space and doesn't serve any purpose.**
- **If you have applications that rely on the database you should migrate them as soon as possible to using the API as only that data is provided in real-time.**
- Replace SQLite3 with lowdb in `core-webhooks` ([#2124])
- **This significantly reduces the size of the package and it's dependencies.**
- Replaced `core-logger-winston` with `core-logger-pino` ([#2134])
- **This significantly improves performance of logging when it occurs a lot in situation like syncing.**
- Rewrote `core-tester-cli` from scratch ([#2133])
- Merged `core-debugger-cli` into `core-tester-cli` and deprecated it ([#2133])

### Added

- Implement AIP29 ([#2122])
- Search delegates by their username in `core-api` ([#2143])
- Implemented the `ark reinstall` command in `core` ([#2192])
- Added the `--force` flag to the `ark update` command in `core` ([#2190])
- Added more parameters for delegate searches in `core-api` ([#2184])
- Add the `/v2/delegates/active` endpoint to `core-api` ([#2205])
- Added restart flags to the `ark update` command in `core` ([#2218])
- Added the `make:block` command to `core-tester-cli` to create blocks ([#2221])

### Fixed

- Properly sort peers by their version ([#2229])

### Changed

- Increased the vendor field length to 255 bytes ([#2159])
- Replaced `micromatch` with `nanomatch` to improve performance ([#2165])
- Replaced `axios` with `got` to resolve known timeout issues with `axios` ([#2203])
- Switch block id to full SHA256 ([#2156])

### Removed

- Removed dead fast rebuild code that hasn't been used since 2.0 release ([#2210])

## [2.2.0] - 2019-03-11

### Added
Expand Down Expand Up @@ -330,14 +370,33 @@ Closed security vulnerabilities:
[#2108]: https://github.com/ArkEcosystem/core/pull/2108
[#2119]: https://github.com/ArkEcosystem/core/pull/2119
[#2121]: https://github.com/ArkEcosystem/core/pull/2121
[#2122]: https://github.com/ArkEcosystem/core/pull/2122
[#2123]: https://github.com/ArkEcosystem/core/pull/2123
[#2124]: https://github.com/ArkEcosystem/core/pull/2124
[#2125]: https://github.com/ArkEcosystem/core/pull/2125
[#2133]: https://github.com/ArkEcosystem/core/pull/2133
[#2133]: https://github.com/ArkEcosystem/core/pull/2133
[#2134]: https://github.com/ArkEcosystem/core/pull/2134
[#2135]: https://github.com/ArkEcosystem/core/pull/2135
[#2137]: https://github.com/ArkEcosystem/core/pull/2137
[#2139]: https://github.com/ArkEcosystem/core/pull/2139
[#2142]: https://github.com/ArkEcosystem/core/pull/2142
[#2143]: https://github.com/ArkEcosystem/core/pull/2143
[#2144]: https://github.com/ArkEcosystem/core/pull/2144
[#2149]: https://github.com/ArkEcosystem/core/pull/2149
[#2152]: https://github.com/ArkEcosystem/core/pull/2152
[#2156]: https://github.com/ArkEcosystem/core/pull/2156
[#2159]: https://github.com/ArkEcosystem/core/pull/2159
[#2165]: https://github.com/ArkEcosystem/core/pull/2165
[#2184]: https://github.com/ArkEcosystem/core/pull/2184
[#2190]: https://github.com/ArkEcosystem/core/pull/2190
[#2192]: https://github.com/ArkEcosystem/core/pull/2192
[#2203]: https://github.com/ArkEcosystem/core/pull/2203
[#2205]: https://github.com/ArkEcosystem/core/pull/2205
[#2207]: https://github.com/ArkEcosystem/core/pull/2207
[#2209]: https://github.com/ArkEcosystem/core/pull/2209
[#2210]: https://github.com/ArkEcosystem/core/pull/2210
[#2217]: https://github.com/ArkEcosystem/core/pull/2217
[#2218]: https://github.com/ArkEcosystem/core/pull/2218
[#2221]: https://github.com/ArkEcosystem/core/pull/2221
[#2229]: https://github.com/ArkEcosystem/core/pull/2229
3 changes: 1 addition & 2 deletions README.md
Expand Up @@ -19,7 +19,7 @@ This repository contains all plugins that make up the Ark Core.

## API Documentation

- API v1 : https://docs.ark.io/api/public/v1/
- API v1 : https://docs.ark.io/archive/api/public-v1/ (Deprecated)
- API v2 : https://docs.ark.io/api/public/v2/

## GitHub Development Bounty
Expand Down Expand Up @@ -51,7 +51,6 @@ This repository contains all plugins that make up the Ark Core.
| [core-p2p](/packages/core-p2p) | [![npm](https://badgen.now.sh/npm/v/@arkecosystem/core-p2p)](https://www.npmjs.com/package/@arkecosystem/core-p2p) | P2P Communication |
| [core-snapshots](/packages/core-snapshots) | [![npm](https://badgen.now.sh/npm/v/@arkecosystem/core-snapshots)](https://www.npmjs.com/package/@arkecosystem/core-snapshots) | Snapshot Manager |
| [core-snapshots-cli](/packages/core-snapshots-cli) | [![npm](https://badgen.now.sh/npm/v/@arkecosystem/core-snapshots-cli)](https://www.npmjs.com/package/@arkecosystem/core-snapshots-cli) | Snapshot CLI |
| [core-test-utils](/packages/core-test-utils) | [![npm](https://badgen.now.sh/npm/v/@arkecosystem/core-test-utils)](https://www.npmjs.com/package/@arkecosystem/core-test-utils) | Test Utilities _(development only)_ |
| [core-tester-cli](/packages/core-tester-cli) | [![npm](https://badgen.now.sh/npm/v/@arkecosystem/core-tester-cli)](https://www.npmjs.com/package/@arkecosystem/core-tester-cli) | Tester CLi _(development only)_ |
| [core-transaction-pool](/packages/core-transaction-pool) | [![npm](https://badgen.now.sh/npm/v/@arkecosystem/core-transaction-pool)](https://www.npmjs.com/package/@arkecosystem/core-transaction-pool) | Transaction Pool |
| [core-utils](/packages/core-utils) | [![npm](https://badgen.now.sh/npm/v/@arkecosystem/core-utils)](https://www.npmjs.com/package/@arkecosystem/core-utils) | Utilities |
Expand Down
@@ -1,13 +1,13 @@
import { app } from "@arkecosystem/core-container";
import { Database } from "@arkecosystem/core-interfaces";
import delay from "delay";
import { registerWithContainer, setUpContainer } from "../../../core-test-utils/src/helpers/container";
import { plugin } from "../../src/plugin";
import { plugin } from "../../../../packages/core-api/src/plugin";
import { registerWithContainer, setUpContainer } from "../../../utils/helpers/container";

import { delegates } from "../../../core-test-utils/src/fixtures";
import { delegates } from "../../../utils/fixtures";
import { generateRound } from "./utils/generate-round";

import { queries } from "../../../core-database-postgres/src/queries";
import { sortBy } from "@arkecosystem/utils";

const round = generateRound(delegates.map(delegate => delegate.publicKey), 1);

Expand All @@ -24,7 +24,6 @@ async function setUp() {
await setUpContainer({
exclude: [
"@arkecosystem/core-webhooks",
"@arkecosystem/core-graphql",
"@arkecosystem/core-forger",
"@arkecosystem/core-json-rpc",
"@arkecosystem/core-api",
Expand All @@ -33,8 +32,7 @@ async function setUp() {

const databaseService = app.resolvePlugin<Database.IDatabaseService>("database");
await databaseService.connection.roundsRepository.truncate();
await databaseService.buildWallets(1);
await databaseService.saveWallets(true);
await databaseService.buildWallets();
await databaseService.saveRound(round);

await registerWithContainer(plugin, options);
Expand All @@ -50,11 +48,12 @@ async function tearDown() {
async function calculateRanks() {
const databaseService = app.resolvePlugin<Database.IDatabaseService>("database");

const rows = await (databaseService.connection as any).query.manyOrNone(queries.spv.delegatesRanks);
const delegateWallets = Object.values(databaseService.walletManager.allByUsername()).sort(
(a: Database.IWallet, b: Database.IWallet) => b.voteBalance.comparedTo(a.voteBalance),
);

rows.forEach((delegate, i) => {
sortBy(delegateWallets, "publicKey").forEach((delegate, i) => {
const wallet = databaseService.walletManager.findByPublicKey(delegate.publicKey);
wallet.missedBlocks = +delegate.missedBlocks;
(wallet as any).rate = i + 1;

databaseService.walletManager.reindex(wallet);
Expand Down
@@ -1,10 +1,10 @@
import "@arkecosystem/core-test-utils";
import "jest-extended";
import "../../../utils";

import { crypto } from "@arkecosystem/crypto";
import genesisBlock from "../../../core-test-utils/src/config/testnet/genesisBlock.json";
// noinspection TypeScriptPreferShortImport
import { TransactionsRepository } from "../../dist/repositories/transactions";
import { TransactionsRepository } from "../../../../packages/core-api/src/repositories/transactions";
import genesisBlock from "../../../utils/config/testnet/genesisBlock.json";
import { setUp, tearDown } from "../__support__/setup";

let repository;
Expand Down
@@ -1,4 +1,4 @@
import "@arkecosystem/core-test-utils";
import "../../../../utils";
import { setUp, tearDown } from "../../__support__/setup";
import { utils } from "../utils";

Expand Down
@@ -1,6 +1,6 @@
import { app } from "@arkecosystem/core-container";
import "@arkecosystem/core-test-utils";
import genesisBlock from "../../../../core-test-utils/src/config/testnet/genesisBlock.json";
import "../../../../utils";
import genesisBlock from "../../../../utils/config/testnet/genesisBlock.json";
import { setUp, tearDown } from "../../__support__/setup";
import { utils } from "../utils";

Expand Down
@@ -1,4 +1,4 @@
import "@arkecosystem/core-test-utils";
import "../../../../utils";
import { setUp, tearDown } from "../../__support__/setup";
import { utils } from "../utils";

Expand Down