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
Merge requests
!1214
Reduce cpu
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Closed
Reduce cpu
reduce_cpu
into
dev
Overview
41
Commits
10
Pipelines
0
Changes
11
Closed
Éloïs
requested to merge
reduce_cpu
into
dev
7 years ago
Overview
37
Commits
10
Pipelines
0
Changes
11
0
0
Merge request reports
Compare
dev
version 3
63a7f4b7
7 years ago
version 2
d19e76bf
7 years ago
version 1
97d0de73
7 years ago
dev (base)
and
latest version
latest version
63a7f4b7
10 commits,
7 years ago
version 3
63a7f4b7
107 commits,
7 years ago
version 2
d19e76bf
7 commits,
7 years ago
version 1
97d0de73
3 commits,
7 years ago
11 files
+
157
−
38
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
11
Conflict: This file was modified in both the source and target branches. Ask someone with write access to resolve it.
app/lib/computation/BlockchainContext.ts
+
10
−
0
View file @ 63a7f4b7
Edit in single-file editor
Open in Web IDE
Show full file
@@ -93,6 +93,16 @@ export class BlockchainContext {
return
local_vHEAD
.
issuerDiff
;
}
/**
* Utility method: gives the number of block in the current frame for a given issuer.
* @param issuer The issuer we want.
*/
async
getIssuerNbBlockInFrame
(
issuer
:
string
):
Promise
<
number
>
{
const
local_vHEAD
=
await
this
.
getvHeadCopy
({
issuer
})
let
issuerNbBlockInFrame
=
await
indexer
.
preparePersonalizedPoW
(
local_vHEAD
,
this
.
vHEAD_1
,
(
n
:
number
,
m
:
number
,
p
=
""
)
=>
this
.
dal
.
range
(
n
,
m
,
p
),
this
.
conf
)
return
issuerNbBlockInFrame
}
setConfDAL
(
newConf
:
any
,
newDAL
:
any
,
theBlockchain
:
DuniterBlockchain
,
theQuickSynchronizer
:
QuickSynchronizer
):
void
{
this
.
dal
=
newDAL
;
this
.
conf
=
newConf
;
Loading