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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nodes
typescript
duniter
Commits
cb79b38c
Commit
cb79b38c
authored
7 years ago
by
Cédric Moreau
Browse files
Options
Downloads
Patches
Plain Diff
[fix]
#1023
Remove "wotb maintenance" old code
parent
4c3816df
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/lib/dal/fileDAL.ts
+0
-7
0 additions, 7 deletions
app/lib/dal/fileDAL.ts
app/lib/dal/sqliteDAL/index/IIndexDAL.ts
+0
-6
0 additions, 6 deletions
app/lib/dal/sqliteDAL/index/IIndexDAL.ts
with
0 additions
and
13 deletions
app/lib/dal/fileDAL.ts
+
0
−
7
View file @
cb79b38c
...
@@ -110,13 +110,6 @@ export class FileDAL {
...
@@ -110,13 +110,6 @@ export class FileDAL {
}
}
logger
.
debug
(
"
Upgrade database...
"
);
logger
.
debug
(
"
Upgrade database...
"
);
await
this
.
metaDAL
.
upgradeDatabase
(
conf
);
await
this
.
metaDAL
.
upgradeDatabase
(
conf
);
const
latestMember
=
await
this
.
iindexDAL
.
getLatestMember
();
if
(
latestMember
&&
this
.
wotb
.
getWoTSize
()
>
latestMember
.
wotb_id
+
1
)
{
logger
.
warn
(
'
Maintenance: cleaning wotb...
'
);
while
(
this
.
wotb
.
getWoTSize
()
>
latestMember
.
wotb_id
+
1
)
{
this
.
wotb
.
removeNode
();
}
}
// Update the maximum certifications count a member can issue into the C++ addon
// Update the maximum certifications count a member can issue into the C++ addon
const
currencyParams
=
await
this
.
getParameters
();
const
currencyParams
=
await
this
.
getParameters
();
if
(
currencyParams
&&
currencyParams
.
sigStock
!==
undefined
&&
currencyParams
.
sigStock
!==
null
)
{
if
(
currencyParams
&&
currencyParams
.
sigStock
!==
undefined
&&
currencyParams
.
sigStock
!==
null
)
{
...
...
This diff is collapsed.
Click to expand it.
app/lib/dal/sqliteDAL/index/IIndexDAL.ts
+
0
−
6
View file @
cb79b38c
...
@@ -89,12 +89,6 @@ export class IIndexDAL extends AbstractIndex<IindexEntry> {
...
@@ -89,12 +89,6 @@ export class IIndexDAL extends AbstractIndex<IindexEntry> {
'
)
'
)
'
)
'
)
}
}
async
getLatestMember
()
{
const
res
:
any
=
(
await
this
.
query
(
'
SELECT MAX(wotb_id) as max_wotb_id FROM
'
+
this
.
table
))[
0
]
const
max_wotb_id
=
res
.
max_wotb_id
return
this
.
entityOrNull
(
'
wotb_id
'
,
max_wotb_id
)
}
async
getToBeKickedPubkeys
()
{
async
getToBeKickedPubkeys
()
{
// All those who has been subject to, or who are currently subject to kicking. Make one result per pubkey.
// All those who has been subject to, or who are currently subject to kicking. Make one result per pubkey.
const
reducables
=
Indexer
.
DUP_HELPERS
.
reduceBy
(
await
this
.
sqlFind
({
kick
:
true
}),
[
'
pub
'
]);
const
reducables
=
Indexer
.
DUP_HELPERS
.
reduceBy
(
await
this
.
sqlFind
({
kick
:
true
}),
[
'
pub
'
]);
...
...
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