Skip to content
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.

Need to change LargerHashStateMachine to two commands #136

yaronyg opened this issue Sep 23, 2015 · 0 comments

Need to change LargerHashStateMachine to two commands #136

yaronyg opened this issue Sep 23, 2015 · 0 comments


Copy link

yaronyg commented Sep 23, 2015

Right now it has three states commands, start, stop and exchangeIdentity. But in reality there are just two three states that only require two commands.

noIdentityExchange - this command would have us tell anyone who asks that we haven't picked anyone to exchange identities with.

exchangeIdentity - Means we have picked someone and if we have the smaller hash then we will advertise wrongPeer (e.g. anyone who talks to our network endpoint is the wrongPeer because the right peer has a larger hash and therefore we are reaching out to them) and if we have the larger hash then we go to waitForCB.

Calling noIdentityExchange just takes us out of identityExchange and back to advertising that we haven't picked who we want to exchange identities with.

So the current three commands are not necessary. But I don't want to do the surgery right now to simplify them down to two commands. Besides I suspect we will be doing some fairly heavy surgery on the identity exchange infrastructure when we bring in the new notifications (including things like adding TLS and possibly negotiating the first part of the protocol over BLE) so it's better to do it then.

@yaronyg yaronyg self-assigned this Jul 12, 2016
@yaronyg yaronyg added this to the New Infra milestone Jul 12, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet

No branches or pull requests

1 participant