debugging auth
This commit is contained in:
@@ -318,7 +318,7 @@ func TimeStamper() (s string) {
|
|||||||
// GetNLoc returns multiple levels of depth of code location from the current.
|
// GetNLoc returns multiple levels of depth of code location from the current.
|
||||||
func GetNLoc(n int) (output string) {
|
func GetNLoc(n int) (output string) {
|
||||||
for ; n > 1; n-- {
|
for ; n > 1; n-- {
|
||||||
output += fmt.Sprintf("%s\n", GetLoc(n))
|
output += fmt.Sprintf(" %s\n", GetLoc(n))
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -111,11 +111,11 @@ func (s *Server) acceptEvent(c context.T, evt *event.T, authedPubkey []byte,
|
|||||||
// }
|
// }
|
||||||
// check the authed pubkey is in the follow list
|
// check the authed pubkey is in the follow list
|
||||||
for pk := range s.followed {
|
for pk := range s.followed {
|
||||||
|
log.I.F("%0x %0x", authedPubkey, []byte(pk))
|
||||||
// allow all events from follows of owners
|
// allow all events from follows of owners
|
||||||
if bytes.Equal(authedPubkey, []byte(pk)) {
|
if bytes.Equal(authedPubkey, []byte(pk)) {
|
||||||
log.I.F("accepting event %0x because %0x on owner follow list",
|
log.I.F("accepting event %0x because %0x on owner follow list",
|
||||||
evt.Id, []byte(pk))
|
evt.Id, []byte(pk))
|
||||||
// log.I.S([]byte(pk))
|
|
||||||
accept = true
|
accept = true
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func (a *A) HandleMessage(msg []byte, remote string) {
|
func (a *A) HandleMessage(msg []byte, remote string) {
|
||||||
log.T.F("received message from %s\n%s", remote, msg)
|
// log.T.F("received message from %s\n%s", remote, msg)
|
||||||
var notice []byte
|
var notice []byte
|
||||||
var err error
|
var err error
|
||||||
var t string
|
var t string
|
||||||
|
|||||||
Reference in New Issue
Block a user