This commit is contained in:
smolgrrr 2024-08-30 10:54:52 +10:00
parent 66b18bb152
commit c2a869bd36
4 changed files with 6 additions and 6 deletions

View File

@ -187,7 +187,7 @@ const NewNoteCard = ({
className="bg-neutral-800 text-white text-xs font-medium border-none rounded-lg w-10" className="bg-neutral-800 text-white text-xs font-medium border-none rounded-lg w-10"
value={difficulty} value={difficulty}
onChange={(e) => setDifficulty(e.target.value)} onChange={(e) => setDifficulty(e.target.value)}
min="22" min="16"
/> />
<button <button
type="button" type="button"

View File

@ -79,7 +79,7 @@ const Settings = () => {
type="number" type="number"
value={filterDifficulty} value={filterDifficulty}
onChange={e => setFilterDifficulty(e.target.value)} onChange={e => setFilterDifficulty(e.target.value)}
min={22} min={16}
className="w-full px-3 py-2 border rounded-md bg-black" className="w-full px-3 py-2 border rounded-md bg-black"
/> />
</div> </div>
@ -94,7 +94,7 @@ const Settings = () => {
type="number" type="number"
value={difficulty} value={difficulty}
onChange={e => setDifficulty(e.target.value)} onChange={e => setDifficulty(e.target.value)}
min={22} min={16}
className="w-full px-3 py-2 border rounded-md bg-black" className="w-full px-3 py-2 border rounded-md bg-black"
/> />
</div> </div>

View File

@ -1 +1 @@
export const DEFAULT_DIFFICULTY = 22; export const DEFAULT_DIFFICULTY = 21;

View File

@ -13,7 +13,7 @@ export const subGlobalFeed = (onEvent: SubCallback, age: number) => {
const now = Math.floor(Date.now() * 0.001); const now = Math.floor(Date.now() * 0.001);
const pubkeys = new Set<string>(); const pubkeys = new Set<string>();
const notes = new Set<string>(); const notes = new Set<string>();
const prefix = 6; // 4 bits in each '0' character const prefix = 4; // 4 bits in each '0' character
sub({ // get past events sub({ // get past events
cb: (evt, relay) => { cb: (evt, relay) => {
pubkeys.add(evt.pubkey); pubkeys.add(evt.pubkey);
@ -300,7 +300,7 @@ export const subHashtagFeed = (
unsub: true unsub: true
}); });
const prefix = 6; // 4 bits in each '0' character const prefix = 4; // 4 bits in each '0' character
sub({ // get past events sub({ // get past events
cb: (evt, relay) => { cb: (evt, relay) => {
pubkeys.add(evt.pubkey); pubkeys.add(evt.pubkey);