diff options
author | ferhat elmas <elmas.ferhat@gmail.com> | 2017-12-04 18:07:10 +0800 |
---|---|---|
committer | Felix Lange <fjl@users.noreply.github.com> | 2017-12-04 18:07:10 +0800 |
commit | 1d06e41f04d75c31334c455063e9ec7b4136bf23 (patch) | |
tree | 46ee6e5ead5cc7c00252c4bcee35ff3778548a16 /swarm | |
parent | 43dd8e62fcc854d1ad51f3a49b118d40397b7fd8 (diff) | |
download | go-tangerine-1d06e41f04d75c31334c455063e9ec7b4136bf23.tar go-tangerine-1d06e41f04d75c31334c455063e9ec7b4136bf23.tar.gz go-tangerine-1d06e41f04d75c31334c455063e9ec7b4136bf23.tar.bz2 go-tangerine-1d06e41f04d75c31334c455063e9ec7b4136bf23.tar.lz go-tangerine-1d06e41f04d75c31334c455063e9ec7b4136bf23.tar.xz go-tangerine-1d06e41f04d75c31334c455063e9ec7b4136bf23.tar.zst go-tangerine-1d06e41f04d75c31334c455063e9ec7b4136bf23.zip |
p2p, swarm/network/kademlia: use IsZero to check for zero time (#15603)
Diffstat (limited to 'swarm')
-rw-r--r-- | swarm/network/kademlia/kaddb.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/swarm/network/kademlia/kaddb.go b/swarm/network/kademlia/kaddb.go index cb0869467..b37ced5ba 100644 --- a/swarm/network/kademlia/kaddb.go +++ b/swarm/network/kademlia/kaddb.go @@ -330,7 +330,7 @@ func (self *KadDb) load(path string, cb func(*NodeRecord, Node) error) (err erro } } n++ - if (node.After == time.Time{}) { + if node.After.IsZero() { node.After = time.Now() } self.index[node.Addr] = node |