Commit 2f6fa4f5 authored by Steven Allen's avatar Steven Allen

remove excessive time.Now() calls from bitswap sessions

License: MIT
Signed-off-by: default avatarSteven Allen <steven@stebalien.com>
parent 7787e3d1
......@@ -279,8 +279,9 @@ func (s *Session) receiveBlock(ctx context.Context, blk blocks.Block) {
}
func (s *Session) wantBlocks(ctx context.Context, ks []*cid.Cid) {
now := time.Now()
for _, c := range ks {
s.liveWants[c.KeyString()] = time.Now()
s.liveWants[c.KeyString()] = now
}
s.bs.wm.WantBlocks(ctx, ks, s.activePeersArr, s.id)
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment