mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-27 07:57:30 +08:00
Fix "PNetFingerpint" field typo of core.IpfsNode
License: MIT Signed-off-by: Jason Chang <ridewindx@163.com>
This commit is contained in:

committed by
Jakub Sztandera

parent
199a52d777
commit
fbc495db4c
@ -319,9 +319,9 @@ func daemonFunc(req *cmds.Request, re cmds.ResponseEmitter, env cmds.Environment
|
||||
}
|
||||
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.Printf("Swarm key fingerprint: %x\n", node.PNetFingerpint)
|
||||
fmt.Printf("Swarm key fingerprint: %x\n", node.PNetFingerprint)
|
||||
}
|
||||
|
||||
printSwarmAddrs(node)
|
||||
|
10
core/core.go
10
core/core.go
@ -106,10 +106,10 @@ type IpfsNode struct {
|
||||
Repo repo.Repo
|
||||
|
||||
// Local node
|
||||
Pinning pin.Pinner // the pinning manager
|
||||
Mounts Mounts // current mount state, if any.
|
||||
PrivateKey ic.PrivKey // the local node's private Key
|
||||
PNetFingerpint []byte // fingerprint of private network
|
||||
Pinning pin.Pinner // the pinning manager
|
||||
Mounts Mounts // current mount state, if any.
|
||||
PrivateKey ic.PrivKey // the local node's private Key
|
||||
PNetFingerprint []byte // fingerprint of private network
|
||||
|
||||
// Services
|
||||
Peerstore pstore.Peerstore // storage for other Peer instances
|
||||
@ -195,7 +195,7 @@ func (n *IpfsNode) startOnlineServices(ctx context.Context, routingOption Routin
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
n.PNetFingerpint = protec.Fingerprint()
|
||||
n.PNetFingerprint = protec.Fingerprint()
|
||||
go func() {
|
||||
t := time.NewTicker(30 * time.Second)
|
||||
<-t.C // swallow one tick
|
||||
|
Reference in New Issue
Block a user