Comments (8)
I don't like the distance to depend on the status of the node
from tox.
Node having possibility of offline should be replaced with higher priority.
Also, c-toxcore uses this concept of Good and Bad nodes.
When we get new nodes from NodesResponse, we have to select node which will be replaced.
from tox.
I suggest not to touch PackedNode
struct but create new DhtNode
struct (or similar name) because PackedNode
is used in packets and should be serialized/deserialized as is. And then we can create functions to convert PackedNode
to DhtNode
.
from tox.
Node having possibility of offline should be replaced with higher priority.
But we can compare nodes outside of distance
function, just check status first. distance
is used not only for DHT and shouldn't be dependent on node status.
from tox.
DhtNode
is a good suggestion
from tox.
Then I will create DhtNode type, and replace_order() function.
replace_order() will compare status of node and PK's distance.
replace_order() will be used in Kbucket and Bucket.
So, Bucket struct will changed from
struct Bucket {
nodes: Vec<PackedNode>
...
}
to
struct Bucket {
nodes: Vec<DhtNode>
....
}
from tox.
let's try
from tox.
Then we can merge ClientData
with DhtNode
.
from tox.
Related Issues (20)
- examples/echo.rs: remove hardcoded keys HOT 10
- Race in toxcore::tcp::client::client::tests::spawn HOT 3
- Replace IpPort::is_global with IpAddr::is_global from std
- Replace Digest with a plain array in OnionAnnounceResponsePayload HOT 2
- Get rid of byteorder
- Return with custom ErrorKind at nom 5.0
- Remove custom GetPayloadError in favor of macro error_kind!
- ssh HOT 2
- ssh or vpn HOT 1
- Update cookie_factory from 0.2 to 0.3
- Move to async/await HOT 1
- Replace blocking Mutex with future Mutex HOT 8
- Failure is deprecated HOT 3
- AWTCY (AreWeToxClientYet)? HOT 8
- [Question] Can I send friend request with a message? HOT 2
- Replace PrecomputedCache's blocking Mutex with future Mutex
- Get rid of libsodium
- Api
- Question: tox-rs vs. c-toxcore - differences when deployed as server node HOT 4
- How to send file? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tox.