@ -685,7 +685,7 @@ func (f *Fetcher) forgetHash(hash common.Hash) {
// Remove all pending announces and decrement DOS counters
// Remove all pending announces and decrement DOS counters
for _ , announce := range f . announced [ hash ] {
for _ , announce := range f . announced [ hash ] {
f . announces [ announce . origin ] --
f . announces [ announce . origin ] --
if f . announces [ announce . origin ] = = 0 {
if f . announces [ announce . origin ] < = 0 {
delete ( f . announces , announce . origin )
delete ( f . announces , announce . origin )
}
}
}
}
@ -696,7 +696,7 @@ func (f *Fetcher) forgetHash(hash common.Hash) {
// Remove any pending fetches and decrement the DOS counters
// Remove any pending fetches and decrement the DOS counters
if announce := f . fetching [ hash ] ; announce != nil {
if announce := f . fetching [ hash ] ; announce != nil {
f . announces [ announce . origin ] --
f . announces [ announce . origin ] --
if f . announces [ announce . origin ] = = 0 {
if f . announces [ announce . origin ] < = 0 {
delete ( f . announces , announce . origin )
delete ( f . announces , announce . origin )
}
}
delete ( f . fetching , hash )
delete ( f . fetching , hash )
@ -705,7 +705,7 @@ func (f *Fetcher) forgetHash(hash common.Hash) {
// Remove any pending completion requests and decrement the DOS counters
// Remove any pending completion requests and decrement the DOS counters
for _ , announce := range f . fetched [ hash ] {
for _ , announce := range f . fetched [ hash ] {
f . announces [ announce . origin ] --
f . announces [ announce . origin ] --
if f . announces [ announce . origin ] = = 0 {
if f . announces [ announce . origin ] < = 0 {
delete ( f . announces , announce . origin )
delete ( f . announces , announce . origin )
}
}
}
}
@ -714,7 +714,7 @@ func (f *Fetcher) forgetHash(hash common.Hash) {
// Remove any pending completions and decrement the DOS counters
// Remove any pending completions and decrement the DOS counters
if announce := f . completing [ hash ] ; announce != nil {
if announce := f . completing [ hash ] ; announce != nil {
f . announces [ announce . origin ] --
f . announces [ announce . origin ] --
if f . announces [ announce . origin ] = = 0 {
if f . announces [ announce . origin ] < = 0 {
delete ( f . announces , announce . origin )
delete ( f . announces , announce . origin )
}
}
delete ( f . completing , hash )
delete ( f . completing , hash )