mirror of
https://github.com/smolgrrr/TAO.git
synced 2024-09-20 01:11:25 +00:00
raise min diff
This commit is contained in:
parent
f4127621e1
commit
7ed89267d4
@ -176,7 +176,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="10" // Assuming a minimum difficulty value of 1
|
min="21"
|
||||||
/>
|
/>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
|
@ -24,7 +24,7 @@ const Home = () => {
|
|||||||
<div className="w-full px-4 sm:px-0 sm:max-w-xl mx-auto my-2">
|
<div className="w-full px-4 sm:px-0 sm:max-w-xl mx-auto my-2">
|
||||||
<NewNoteCard />
|
<NewNoteCard />
|
||||||
</div>
|
</div>
|
||||||
<div className={`grid grid-cols-1 max-w-xl mx-auto gap-1 px-4 ${isAnimating ? 'animate-pulse' : ''}`}>
|
<div className={`grid grid-cols-1 max-w-xl mx-auto gap-1 ${isAnimating ? 'animate-pulse' : ''}`}>
|
||||||
{processedEvents.map((event) => (
|
{processedEvents.map((event) => (
|
||||||
<PostCard
|
<PostCard
|
||||||
key={event.postEvent.id}
|
key={event.postEvent.id}
|
||||||
|
@ -79,6 +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={21}
|
||||||
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>
|
||||||
@ -93,6 +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={21}
|
||||||
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>
|
||||||
|
@ -66,7 +66,7 @@ const Thread = () => {
|
|||||||
</div>
|
</div>
|
||||||
<ThreadPostModal OPEvent={OPEvent} />
|
<ThreadPostModal OPEvent={OPEvent} />
|
||||||
<div className="col-span-full h-0.5 bg-neutral-900 mb-2"/> {/* This is the white line separator */}
|
<div className="col-span-full h-0.5 bg-neutral-900 mb-2"/> {/* This is the white line separator */}
|
||||||
<div className="grid grid-cols-1 max-w-xl mx-auto gap-1 px-4">
|
<div className="grid grid-cols-1 max-w-xl mx-auto gap-1">
|
||||||
{replyEvents.map((event: Event) => (
|
{replyEvents.map((event: Event) => (
|
||||||
<div className={`w-11/12 ${event.tags.find(tag => tag[0] === 'e' && tag[1] !== OPEvent.id) ? 'ml-auto' : 'mr-auto'}`}>
|
<div className={`w-11/12 ${event.tags.find(tag => tag[0] === 'e' && tag[1] !== OPEvent.id) ? 'ml-auto' : 'mr-auto'}`}>
|
||||||
<PostCard
|
<PostCard
|
||||||
|
@ -1 +1 @@
|
|||||||
export const DEFAULT_DIFFICULTY = 20;
|
export const DEFAULT_DIFFICULTY = 21;
|
@ -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 = Math.floor(16 / 4); // 4 bits in each '0' character
|
const prefix = 6; // 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);
|
||||||
@ -301,12 +301,12 @@ export const subHashtagFeed = (
|
|||||||
"#t": [hashtag],
|
"#t": [hashtag],
|
||||||
kinds: [1, 6],
|
kinds: [1, 6],
|
||||||
since: Math.floor((Date.now() * 0.001) - (age * 60 * 60)),
|
since: Math.floor((Date.now() * 0.001) - (age * 60 * 60)),
|
||||||
limit: 25,
|
limit: 20,
|
||||||
},
|
},
|
||||||
unsub: true
|
unsub: true
|
||||||
});
|
});
|
||||||
|
|
||||||
const prefix = Math.floor(16 / 4); // 4 bits in each '0' character
|
const prefix = 6; // 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);
|
||||||
|
Loading…
Reference in New Issue
Block a user