Manually ban a node #94

Closed
opened 2 years ago by duke · 6 comments
duke commented 2 years ago
Owner

A user should be able to right click on a peer node and choose to ban it. There should be a confirmation modal that pops up to confirm.

A user should be able to right click on a peer node and choose to ban it. There should be a confirmation modal that pops up to confirm.
Collaborator

@duke See this commit for banning/unbanning. I did not add confirmation but can if you think it's necessary. It will update lists and and show status in bottom left for 3 seconds after banning/unbanning. a236d83322

@duke See this commit for banning/unbanning. I did not add confirmation but can if you think it's necessary. It will update lists and and show status in bottom left for 3 seconds after banning/unbanning. https://git.hush.is/hush/SilentDragon/commit/a236d833223c52809126c005fbc523edfcf3c9a8
Poster
Owner

@fekt looks good, I don't think we need to confirm. It's pretty simple and fast to ban/unban if a person does the wrong thing. Thanks for working on this!

@fekt looks good, I don't think we need to confirm. It's pretty simple and fast to ban/unban if a person does the wrong thing. Thanks for working on this!
Poster
Owner

Just tested this out. Basic functionality does work. When I manually banned a node, I didn't see anything happen initially, so I thought I didn't right click correctly, then did it again. A few seconds later, the node moved to the "Banned Peers" list and then I got an error popup which says "node already banned".

@fekt is there a way we can immediately remove a banned node from the PeersTable when it's banned, even if it doesn't show up in the BannedPeersTable yet? That might be less confusing for users.

Alternately, we could just not do an error popup if a node is already banned.

Just tested this out. Basic functionality does work. When I manually banned a node, I didn't see anything happen initially, so I thought I didn't right click correctly, then did it again. A few seconds later, the node moved to the "Banned Peers" list and then I got an error popup which says "node already banned". @fekt is there a way we can immediately remove a banned node from the PeersTable when it's banned, even if it doesn't show up in the BannedPeersTable yet? That might be less confusing for users. Alternately, we could just not do an error popup if a node is already banned.
Collaborator

@duke I was mostly testing on a fresh wallet and it seemed to respond fairly quickly and refreshPeers is called. On another wallet with txs sending, it seems like other calls happening in the background block the RPC calls and UI from updating. It happens after those other calls finish. There should also be a status message in the bottom left, but it may only be visible on certain themes.

I'll see if I can just remove from the tables when performing actions regardless if RPC got callback.

@duke I was mostly testing on a fresh wallet and it seemed to respond fairly quickly and `refreshPeers` is called. On another wallet with txs sending, it seems like other calls happening in the background block the RPC calls and UI from updating. It happens after those other calls finish. There should also be a status message in the bottom left, but it may only be visible on certain themes. I'll see if I can just remove from the tables when performing actions regardless if RPC got callback.
Collaborator

I tried removing rows and didn't seem to work or at least didn't update UI. Hiding them does. I also added a status message before the RPC call so it should display something like "Banning peer...", which should change to "Peer banned" once the RPC gets callback. On large or busy wallets, it seems like lag with other RPC calls within refreshPeers.

I tried removing rows and didn't seem to work or at least didn't update UI. Hiding them does. I also added a status message before the RPC call so it should display something like "Banning peer...", which should change to "Peer banned" once the RPC gets callback. On large or busy wallets, it seems like lag with other RPC calls within `refreshPeers`.
Poster
Owner

@fekt that sounds good enough. Closing this

@fekt that sounds good enough. Closing this
duke closed this issue 2 years ago
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.