diff --git a/auth/callback.go b/auth/callback.go index a304905f4bef5e6177d04d1b9bb7693fe36be24d..1963b7960e3a68e39f0365fafe3b78e857b1480c 100644 --- a/auth/callback.go +++ b/auth/callback.go @@ -152,7 +152,7 @@ func (m *Manager) handleRequest(cmixMsg format.Message, " msgDigest: %s which has been requested, auto-confirming", partnerID, cmixMsg.Digest()) // do the confirmation - if err := m.doConfirm(sr2, grp, partnerPubKey, myPubKey, + if err := m.doConfirm(sr2, grp, partnerPubKey, sr2.GetPartnerHistoricalPubKey(), ecrFmt.GetOwnership()); err != nil { jww.WARN.Printf("Auto Confirmation with %s failed: %s", partnerID, err) @@ -250,10 +250,10 @@ func (m *Manager) handleConfirm(cmixMsg format.Message, sr *auth.SentRequest, } func (m *Manager) doConfirm(sr *auth.SentRequest, grp *cyclic.Group, - partnerPubKey, myPubKeyOwnershipProof *cyclic.Int, ownershipProof []byte) error { + partnerPubKey, partnerPubKeyOwnershipProof *cyclic.Int, ownershipProof []byte) error { // verify the message came from the intended recipient if !cAuth.VerifyOwnershipProof(sr.GetMyPrivKey(), - myPubKeyOwnershipProof, grp, ownershipProof) { + partnerPubKeyOwnershipProof, grp, ownershipProof) { return errors.Errorf("Failed authenticate identity for auth "+ "confirmation of %s", sr.GetPartner()) } diff --git a/network/follow.go b/network/follow.go index 930d8b860c8a8b739302b3a72f6082dc54dd59f1..a555874adffe6f3f38700afa27d74a3b28f81b9e 100644 --- a/network/follow.go +++ b/network/follow.go @@ -41,7 +41,6 @@ import ( ) const debugTrackPeriod = 1 * time.Minute -const maxChecked = 100000 //comms interface makes testing easier type followNetworkComms interface { diff --git a/network/polltracker.go b/network/polltracker.go index 497539e94ec9d6aa8cb013bd0ee40678e1360731..48574c7d8e19eb4e1d73090af0c017e3c9b8187b 100644 --- a/network/polltracker.go +++ b/network/polltracker.go @@ -17,9 +17,9 @@ func newPollTracker() *pollTracker { func (pt *pollTracker) Track(ephID ephemeral.Id, source *id.ID) { if _, exists := (*pt)[*source]; !exists { (*pt)[*source] = make(map[int64]uint) - (*pt)[*source][ephID.Int64()] = 0 + (*pt)[*source][ephID.Int64()] = 1 } else if _, exists := (*pt)[*source][ephID.Int64()]; !exists { - (*pt)[*source][ephID.Int64()] = 0 + (*pt)[*source][ephID.Int64()] = 1 } else { (*pt)[*source][ephID.Int64()] = (*pt)[*source][ephID.Int64()] + 1 }