Commit d0d35bcd authored by Moul's avatar Moul

[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
......@@ -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 whether 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 ANd not joiner yet (avoid undefined error)
// Add 'joiners && ': special case when block#0 not written and not joiner yet (avoid undefined error)
return !!(joiners && ~joiners.indexOf(cert.from))
});
} else {
......
......@@ -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
......
......@@ -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)
......
......@@ -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.');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment