Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-bitswap
Commits
7525baeb
Commit
7525baeb
authored
Nov 13, 2020
by
Steven Allen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: remove unnecessary (and leaked) ticker
parent
b4720fab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
3 deletions
+0
-3
internal/decision/scoreledger.go
internal/decision/scoreledger.go
+0
-3
No files found.
internal/decision/scoreledger.go
View file @
7525baeb
...
@@ -102,8 +102,6 @@ func (l *scoreledger) Receipt() *Receipt {
...
@@ -102,8 +102,6 @@ func (l *scoreledger) Receipt() *Receipt {
// DefaultScoreLedger is used by Engine as the default ScoreLedger.
// DefaultScoreLedger is used by Engine as the default ScoreLedger.
type
DefaultScoreLedger
struct
{
type
DefaultScoreLedger
struct
{
// a sample counting ticker
ticker
*
time
.
Ticker
// the score func
// the score func
scorePeer
ScorePeerFunc
scorePeer
ScorePeerFunc
// is closed on Close
// is closed on Close
...
@@ -333,7 +331,6 @@ func (dsl *DefaultScoreLedger) PeerDisconnected(p peer.ID) {
...
@@ -333,7 +331,6 @@ func (dsl *DefaultScoreLedger) PeerDisconnected(p peer.ID) {
func
NewDefaultScoreLedger
()
*
DefaultScoreLedger
{
func
NewDefaultScoreLedger
()
*
DefaultScoreLedger
{
return
&
DefaultScoreLedger
{
return
&
DefaultScoreLedger
{
ledgerMap
:
make
(
map
[
peer
.
ID
]
*
scoreledger
),
ledgerMap
:
make
(
map
[
peer
.
ID
]
*
scoreledger
),
ticker
:
time
.
NewTicker
(
time
.
Millisecond
*
100
),
closing
:
make
(
chan
struct
{}),
closing
:
make
(
chan
struct
{}),
peerSampleInterval
:
shortTerm
,
peerSampleInterval
:
shortTerm
,
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment