[Mnet-devel] EGTP status / problems

Whiel O'Zookocronx zooko at zooko.com
Sun Aug 8 21:29:11 BST 2004


On 2004, Aug 08, , at 16:09, Whiel O'Zookocronx wrote:

>  * Make the "session_id" elements of the "counterparty_map" keys be 
> lists of session_ids instead of individual session ids.  Make each 
> session_id in that list appear as a key in "session_map".  Make the 
> lists of session_ids be ordered, so that the first item in the list is 
> the one you use when sending outgoing messages, and the one that you 
> use when sending a "session" message.  Newly generated session_ids get 
> inserted into the 0'th item, and when that happens delete any items 
> greater than the 10th item.  (Or some such number.)

Whoops -- this was slightly wrong.  Here is the relevant code from the 
current version of mesgen.py:

# maps id_in to counterparty id
session_map = {}
# maps counterparty id to [session_id_in, session_id_out, 
symmetric_key, header, full pk,]
counterparty_map = {}

In the e-mail quoted above I suggested:

# maps id_in to counterparty id
session_map = {}
# maps counterparty id to [[session_id_in, ...], [session_id_out, ...], 
symmetric_key, header, full pk,]
counterparty_map = {}

but it should be:

# maps id_in to counterparty id
session_map = {}
# maps counterparty id to [sessions, header, full pk,], where sessions 
is a list of tuples of (session_id_in, session_id_out, symmetric_key,)
counterparty_map = {}

--Z



More information about the Mnet-devel mailing list