RuiSiang / PoW-Shield

Found redundant literal in a logical expression JS-W1043
Anti-pattern
Minor
8 months ago8 months old
Logical expression with a literal operand will always evaluate to the same value
 66                    (await this.nosql.get('stats:bad_nonce')) || '0', //bad_nonce
 67                    (await this.nosql.get('stats:ttl_waf')) || '0', //ttl_waf
 68                    (await this.nosql.get('stats:ttl_solve_time')) || '0', //ttl_solve_time
 69                    (await this.nosql.get('stats:prob_solved')) || '0', //prob_solved 70                  ],
 71                })
 72              )
Logical expression with a literal operand will always evaluate to the same value
 65                    (await this.nosql.get('stats:ttl_req')) || '0', //ttl_req
 66                    (await this.nosql.get('stats:bad_nonce')) || '0', //bad_nonce
 67                    (await this.nosql.get('stats:ttl_waf')) || '0', //ttl_waf
 68                    (await this.nosql.get('stats:ttl_solve_time')) || '0', //ttl_solve_time 69                    (await this.nosql.get('stats:prob_solved')) || '0', //prob_solved
 70                  ],
 71                })
Logical expression with a literal operand will always evaluate to the same value
 64                    (await this.nosql.get('stats:legit_req')) || '0', //legit_req
 65                    (await this.nosql.get('stats:ttl_req')) || '0', //ttl_req
 66                    (await this.nosql.get('stats:bad_nonce')) || '0', //bad_nonce
 67                    (await this.nosql.get('stats:ttl_waf')) || '0', //ttl_waf 68                    (await this.nosql.get('stats:ttl_solve_time')) || '0', //ttl_solve_time
 69                    (await this.nosql.get('stats:prob_solved')) || '0', //prob_solved
 70                  ],
Logical expression with a literal operand will always evaluate to the same value
 63                  arguments: [
 64                    (await this.nosql.get('stats:legit_req')) || '0', //legit_req
 65                    (await this.nosql.get('stats:ttl_req')) || '0', //ttl_req
 66                    (await this.nosql.get('stats:bad_nonce')) || '0', //bad_nonce 67                    (await this.nosql.get('stats:ttl_waf')) || '0', //ttl_waf
 68                    (await this.nosql.get('stats:ttl_solve_time')) || '0', //ttl_solve_time
 69                    (await this.nosql.get('stats:prob_solved')) || '0', //prob_solved
Logical expression with a literal operand will always evaluate to the same value
 62                  method: 'phlx_update_stats',
 63                  arguments: [
 64                    (await this.nosql.get('stats:legit_req')) || '0', //legit_req
 65                    (await this.nosql.get('stats:ttl_req')) || '0', //ttl_req 66                    (await this.nosql.get('stats:bad_nonce')) || '0', //bad_nonce
 67                    (await this.nosql.get('stats:ttl_waf')) || '0', //ttl_waf
 68                    (await this.nosql.get('stats:ttl_solve_time')) || '0', //ttl_solve_time