lint: remove useless parens.
This commit is contained in:
parent
9d48c1385b
commit
73b84cc1a7
@ -1857,7 +1857,7 @@ Peer.prototype.handleFilterClear = async function handleFilterClear(packet) {
|
|||||||
Peer.prototype.handleFeeFilter = async function handleFeeFilter(packet) {
|
Peer.prototype.handleFeeFilter = async function handleFeeFilter(packet) {
|
||||||
const rate = packet.rate;
|
const rate = packet.rate;
|
||||||
|
|
||||||
if (!(rate >= 0 && rate <= consensus.MAX_MONEY)) {
|
if (rate < 0 || rate > consensus.MAX_MONEY) {
|
||||||
this.increaseBan(100);
|
this.increaseBan(100);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1150,7 +1150,7 @@ RPC.prototype.listUnspent = async function listUnspent(args, help) {
|
|||||||
for (const coin of coins) {
|
for (const coin of coins) {
|
||||||
const depth = coin.getDepth(height);
|
const depth = coin.getDepth(height);
|
||||||
|
|
||||||
if (!(depth >= minDepth && depth <= maxDepth))
|
if (depth < minDepth || depth > maxDepth)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
const addr = coin.getAddress();
|
const addr = coin.getAddress();
|
||||||
|
|||||||
@ -769,7 +769,7 @@ TXDB.prototype._add = async function _add(tx, block) {
|
|||||||
|
|
||||||
// Potentially remove double-spenders.
|
// Potentially remove double-spenders.
|
||||||
// Only remove if they're not confirmed.
|
// Only remove if they're not confirmed.
|
||||||
if (!(await this.removeConflicts(tx, true)))
|
if (!await this.removeConflicts(tx, true))
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
// Potentially remove double-spenders.
|
// Potentially remove double-spenders.
|
||||||
@ -827,7 +827,7 @@ TXDB.prototype.insert = async function insert(wtx, block) {
|
|||||||
|
|
||||||
// Do some verification.
|
// Do some verification.
|
||||||
if (!block) {
|
if (!block) {
|
||||||
if (!(await this.verifyInput(tx, i, coin))) {
|
if (!await this.verifyInput(tx, i, coin)) {
|
||||||
this.clear();
|
this.clear();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -329,7 +329,7 @@ CoinView.prototype.ensureInputs = async function ensureInputs(db, tx) {
|
|||||||
let found = true;
|
let found = true;
|
||||||
|
|
||||||
for (const input of tx.inputs) {
|
for (const input of tx.inputs) {
|
||||||
if (!(await this.readCoins(db, input.prevout.hash)))
|
if (!await this.readCoins(db, input.prevout.hash))
|
||||||
found = false;
|
found = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user