nip-13: difficulty filter
#62
Merged
offbyn
merged 1 commits from feed-difficulty-filter
into master
1 year ago
Loading…
Reference in New Issue
There is no content yet.
Delete Branch 'feed-difficulty-filter'
Deleting a branch is permanent. It CANNOT be undone. Continue?
added a slider to adjust the difficulty filter, current default is
0 so all notes are rendered. increasing the filter will hide notes
with lower difficulty target.
changed the max difficulty from 256 to 32 for now so that the
range slider is usable.
this does not yet hide reactions with lower difficulty.
@ -326,2 +326,3 @@
function renderFeed() {
const sortedFeeds = textNoteList.sort(sortByCreatedAt).reverse();
const sortedFeeds = textNoteList
.filter(note => !fitlerDifficulty || note.tags.some(([tag, , commitment]) => tag === 'nonce' && commitment >= fitlerDifficulty))
I forgot if checking the commitment is enough, assuming relays don't forward events with commitment that do not match the nonce.
caf5083caa
into master 1 year agocaf5083caa
.Step 1:
From your project repository, check out a new branch and test the changes.Step 2:
Merge the changes and update on Gitea.