Things that will need changing #1
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nostr/gossip-relay-picker#1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
So I just ripped this code out and got it to compile. It's not API ready.
First off, in gossip, the RelayPicker is Send+Sync and I can call into it asynchronously from multiple tasks. But I ruined that by adding Hooks without those hooks also being Send+Sync. If it needs to be Send + Sync, the Hooks should be declared as such.
Second, the hooks can't return Results with Errors because I couldn't figure out how to wrap the Hook Error type into the outer Error type. But it probably needs to be done.
Third, a consumer needs to use types from the nostr-types library. That's good, since those types have safety code in them. But they also have to exposed in the API.
Fourth, I'm not sure if the stuff declared as async needs to be async anymore, or if the hook functions should be async or not. Someone will have to make that call.
Fifth, the scoring might be degenerate since I ripped out the relay ranking score adjustments, and I'm not sure the hook function returns scores anymore as I type this.
Hooks are now Send + Sync.
Hook errors just need to impl Display. We aren't doing anything fancy except printing them for now.
We are now re-exporting the nostr-types types
We added a hook for scoring
This is all done now.