> It is also important, however, that a Request for one type of key, never 
> return
> data for another type of key. For the sake of this I say that we should 
> enforce
> that two keys of different types can never be equal.
> 
> So for this to work, you need to make sure that the type of key is in every
> Request and Insert for that key, and that the type that it has is always 
> stored
> with the key, and taken into account when keys are compared. But that is
> EXACTLY the same thing as taking it into account the type in the key value. 

My solutionis to have a different message subtype for every kind of
key. So there is Request.Data.ContentHash and Request.Data.Signed,
etc.. They will inherit from a common subclass. So the routing will be the
exact same. However, there won't be key crossover because there is a
different message for requesting different types of keys.

The reason I prefer this to putting the key type in the message or the key
itself is that there is more to handling different key types that just
making sure they're never equal. They are handled differently by the
node. ContentHash keys have the content hash of their data verified, for
instance. I'm not sure exactly how the other key types would be handled,
but it would certainly be somewhat different for each key type.



_______________________________________________
Freenet-dev mailing list
Freenet-dev at lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/freenet-dev

Reply via email to