Browse Source

Confirm to go-wire new TypeByte behavior

pull/456/head
Jae Kwon 9 years ago
parent
commit
44d8e62689
2 changed files with 5 additions and 5 deletions
  1. +2
    -2
      pex_reactor.go
  2. +3
    -3
      secret_connection.go

+ 2
- 2
pex_reactor.go View File

@ -114,11 +114,11 @@ func (pexR *PEXReactor) Receive(chID byte, src *Peer, msgBytes []byte) {
// Asks peer for more addresses.
func (pexR *PEXReactor) RequestPEX(peer *Peer) {
peer.Send(PexChannel, &pexRequestMessage{})
peer.Send(PexChannel, struct{ PexMessage }{&pexRequestMessage{}})
}
func (pexR *PEXReactor) SendAddrs(peer *Peer, addrs []*NetAddress) {
peer.Send(PexChannel, &pexAddrsMessage{Addrs: addrs})
peer.Send(PexChannel, struct{ PexMessage }{&pexAddrsMessage{Addrs: addrs}})
}
// Ensures that sufficient peers are connected. (continuous)


+ 3
- 3
secret_connection.go View File

@ -96,7 +96,7 @@ func MakeSecretConnection(conn io.ReadWriteCloser, locPrivKey crypto.PrivKeyEd25
}
// We've authorized.
sc.remPubKey = remPubKey
sc.remPubKey = remPubKey.(crypto.PubKeyEd25519)
return sc, nil
}
@ -260,8 +260,8 @@ func signChallenge(challenge *[32]byte, locPrivKey crypto.PrivKeyEd25519) (signa
}
type authSigMessage struct {
Key crypto.PubKeyEd25519
Sig crypto.SignatureEd25519
Key crypto.PubKey
Sig crypto.Signature
}
func shareAuthSignature(sc *SecretConnection, pubKey crypto.PubKeyEd25519, signature crypto.SignatureEd25519) (*authSigMessage, error) {


Loading…
Cancel
Save