Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
duniter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nodes
typescript
duniter
Commits
3c2c1384
Commit
3c2c1384
authored
7 years ago
by
Cédric Moreau
Browse files
Options
Downloads
Patches
Plain Diff
[fix] Make CLI tests pass
parent
cf56f504
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/lib/computation/QuickSync.ts
+9
-5
9 additions, 5 deletions
app/lib/computation/QuickSync.ts
with
9 additions
and
5 deletions
app/lib/computation/QuickSync.ts
+
9
−
5
View file @
3c2c1384
"
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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment