At some point it became illegal to send data to oneself, and so the
code looks like this in several places (this is from open):
if peer_id == self.id:
d = Share(self, share.field, (share.field(peer_id), share))
else:
d = self._expect_share(peer_id, share.field)
I think the rationale for disallowing self-sending is that the players
have no ShareExchanger for themselves, and so one cannot _expect_data
or sendData to oneself.
But it should still be possible to clean up the code by handling this
in one central place. Maybe like it is done in _exchange_shares.
|