Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
duniter
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
191
Issues
191
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nodes
typescript
duniter
Commits
d0d35bcd
Commit
d0d35bcd
authored
Apr 07, 2019
by
Moul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[mod] #1356: Remove non-used code getting membership status. Typos in comments
parent
5dff93d2
Pipeline
#5124
failed with stages
in 14 minutes and 32 seconds
Changes
4
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2 additions
and
13 deletions
+2
-13
app/modules/prover/lib/blockGenerator.ts
app/modules/prover/lib/blockGenerator.ts
+2
-2
app/modules/ws2p/lib/WS2PCluster.ts
app/modules/ws2p/lib/WS2PCluster.ts
+0
-3
app/service/BlockchainService.ts
app/service/BlockchainService.ts
+0
-4
server.ts
server.ts
+0
-4
No files found.
app/modules/prover/lib/blockGenerator.ts
View file @
d0d35bcd
...
...
@@ -335,7 +335,7 @@ export class BlockGenerator {
for
(
const
newcomer
of
theNewcomers
)
{
// New array of certifiers
newCerts
[
newcomer
]
=
newCerts
[
newcomer
]
||
[];
// Check wether each certification of the block is from valid newcomer/member
// Check w
h
ether each certification of the block is from valid newcomer/member
for
(
const
cert
of
certsByKey
[
newcomer
])
{
const
isAlreadyCertifying
=
certifiers
.
indexOf
(
cert
.
from
)
!==
-
1
;
if
(
!
(
isAlreadyCertifying
&&
forBlock
>
0
))
{
...
...
@@ -390,7 +390,7 @@ export class BlockGenerator {
// Look for certifications from initial joiners
const
certs
=
await
this
.
dal
.
certsNotLinkedToTarget
(
idHash
);
foundCerts
=
Underscore
.
filter
(
certs
,
(
cert
:
any
)
=>
{
// Add 'joiners && ': special case when block#0 not written
AN
d not joiner yet (avoid undefined error)
// Add 'joiners && ': special case when block#0 not written
an
d not joiner yet (avoid undefined error)
return
!!
(
joiners
&&
~
joiners
.
indexOf
(
cert
.
from
))
});
}
else
{
...
...
app/modules/ws2p/lib/WS2PCluster.ts
View file @
d0d35bcd
...
...
@@ -822,9 +822,6 @@ export class WS2PCluster {
return
false
}
// Is member key ?
const
isMemberPeer
=
await
this
.
server
.
dal
.
isMember
(
pub
)
// Do we have room?
if
(
getConcurrentConnexionsCount
()
<
maxConcurrentConnexionsSize
)
{
// Yes: just connect to it
...
...
app/service/BlockchainService.ts
View file @
d0d35bcd
...
...
@@ -433,10 +433,6 @@ export class BlockchainService extends FIFOService {
})
}
isMember
()
{
return
this
.
dal
.
isMember
(
this
.
selfPubkey
)
}
// TODO: look in archives too
getCountOfSelfMadePoW
()
{
return
this
.
dal
.
getCountOfPoW
(
this
.
selfPubkey
)
...
...
server.ts
View file @
d0d35bcd
...
...
@@ -367,10 +367,6 @@ export class Server extends stream.Duplex implements HookableServer {
return
this
.
BlockchainService
.
getCountOfSelfMadePoW
()
}
isServerMember
()
{
return
this
.
BlockchainService
.
isMember
()
}
checkConfig
():
Promise
<
any
>
{
if
(
!
this
.
conf
.
pair
)
{
throw
new
Error
(
'
No keypair was given.
'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment