Merge pull request #107 from lbryio/fix-blacklistMap

fix blacklist performance
This commit is contained in:
Sean Yesmunt 2021-04-14 12:59:34 -04:00 committed by GitHub
commit c0cadee18d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 8 deletions

View file

@ -13,10 +13,8 @@ export const selectBlacklistedOutpointMap = createSelector(
outpoints outpoints
? outpoints.reduce((acc, val) => { ? outpoints.reduce((acc, val) => {
const outpoint = `${val.txid}:${val.nout}`; const outpoint = `${val.txid}:${val.nout}`;
return { acc[outpoint] = 1;
...acc, return acc;
[outpoint]: 1,
};
}, {}) }, {})
: {} : {}
); );

View file

@ -13,10 +13,8 @@ export const selectFilteredOutpointMap = createSelector(
outpoints outpoints
? outpoints.reduce((acc, val) => { ? outpoints.reduce((acc, val) => {
const outpoint = `${val.txid}:${val.nout}`; const outpoint = `${val.txid}:${val.nout}`;
return { acc[outpoint] = 1;
...acc, return acc;
[outpoint]: 1,
};
}, {}) }, {})
: {} : {}
); );