1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-28 00:39:31 +08:00

Fix "PNetFingerpint" field typo of core.IpfsNode

License: MIT
Signed-off-by: Jason Chang <ridewindx@163.com>
This commit is contained in:
RideWindX
2018-03-01 18:36:36 +08:00
committed by Jakub Sztandera
parent 199a52d777
commit fbc495db4c
2 changed files with 7 additions and 7 deletions

View File

@ -319,9 +319,9 @@ func daemonFunc(req *cmds.Request, re cmds.ResponseEmitter, env cmds.Environment
} }
node.SetLocal(false) node.SetLocal(false)
if node.PNetFingerpint != nil { if node.PNetFingerprint != nil {
fmt.Println("Swarm is limited to private network of peers with the swarm key") fmt.Println("Swarm is limited to private network of peers with the swarm key")
fmt.Printf("Swarm key fingerprint: %x\n", node.PNetFingerpint) fmt.Printf("Swarm key fingerprint: %x\n", node.PNetFingerprint)
} }
printSwarmAddrs(node) printSwarmAddrs(node)

View File

@ -109,7 +109,7 @@ type IpfsNode struct {
Pinning pin.Pinner // the pinning manager Pinning pin.Pinner // the pinning manager
Mounts Mounts // current mount state, if any. Mounts Mounts // current mount state, if any.
PrivateKey ic.PrivKey // the local node's private Key PrivateKey ic.PrivKey // the local node's private Key
PNetFingerpint []byte // fingerprint of private network PNetFingerprint []byte // fingerprint of private network
// Services // Services
Peerstore pstore.Peerstore // storage for other Peer instances Peerstore pstore.Peerstore // storage for other Peer instances
@ -195,7 +195,7 @@ func (n *IpfsNode) startOnlineServices(ctx context.Context, routingOption Routin
if err != nil { if err != nil {
return err return err
} }
n.PNetFingerpint = protec.Fingerprint() n.PNetFingerprint = protec.Fingerprint()
go func() { go func() {
t := time.NewTicker(30 * time.Second) t := time.NewTicker(30 * time.Second)
<-t.C // swallow one tick <-t.C // swallow one tick