Skip to content

Commit

Permalink
Set all prefixes to 64 (so they aren't prefixes)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikedilger committed Oct 19, 2023
1 parent 7364e8f commit 3d97c4a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/overlord/minion/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ impl Minion {
if !followed_pubkeys.is_empty() {
let pkp: Vec<PublicKeyHexPrefix> = followed_pubkeys
.iter()
.map(|pk| Into::<PublicKeyHex>::into(*pk).prefix(16)) // quarter-size
.map(|pk| Into::<PublicKeyHex>::into(*pk).prefix(64))
.collect();

// feed related by people followed
Expand All @@ -479,7 +479,7 @@ impl Minion {
.people
.get_followed_pubkeys_needing_relay_lists(&followed_pubkeys)
.drain(..)
.map(|pk| Into::<PublicKeyHex>::into(pk).prefix(16)) // quarter-size
.map(|pk| Into::<PublicKeyHex>::into(pk).prefix(64))
.collect();

if !keys_needing_relay_lists.is_empty() {
Expand Down Expand Up @@ -645,8 +645,8 @@ impl Minion {
if !pubkeys.is_empty() {
let pkp: Vec<PublicKeyHexPrefix> = pubkeys
.iter()
.map(|pk| Into::<PublicKeyHex>::into(*pk).prefix(16))
.collect(); // quarter-size prefix
.map(|pk| Into::<PublicKeyHex>::into(*pk).prefix(64))
.collect();

let filters: Vec<Filter> = vec![Filter {
authors: pkp,
Expand All @@ -670,7 +670,7 @@ impl Minion {
let event_kinds = crate::feed::feed_displayable_event_kinds(false);

let filters: Vec<Filter> = vec![Filter {
authors: vec![Into::<PublicKeyHex>::into(pubkey).prefix(16)],
authors: vec![Into::<PublicKeyHex>::into(pubkey).prefix(64)],
kinds: event_kinds,
// No since, just a limit on quantity of posts
limit: Some(25),
Expand Down Expand Up @@ -706,7 +706,7 @@ impl Minion {
let idhp: Vec<IdHexPrefix> = vec_ids
.iter()
.map(
|id| id.prefix(16), // quarter-size
|id| id.prefix(64),
)
.collect();

Expand Down Expand Up @@ -780,7 +780,7 @@ impl Minion {
let pkhp: Vec<PublicKeyHexPrefix> = pubkeys
.drain(..)
.map(
|pk| Into::<PublicKeyHex>::into(pk).prefix(16), // quarter-size
|pk| Into::<PublicKeyHex>::into(pk).prefix(64),
)
.collect();

Expand Down

0 comments on commit 3d97c4a

Please sign in to comment.