tests/fuzzers: fix goroutine leak in les fuzzer (#22455)
The oss-fuzz fuzzer has been reporting some failing testcases for les. They're all spurious, and cannot reliably be reproduced. However, running them showed that there was a goroutine leak: the tests created a lot of new clients, which started an exec queue that was never torn down. This PR fixes the goroutine leak, and also a log message which was erroneously formatted.
This commit is contained in:
committed by
GitHub
parent
faacc8e0fa
commit
bc47993692
@ -206,8 +206,8 @@ func handleGetBlockHeaders(msg Decoder) (serveRequestFn, uint64, uint64, error)
|
||||
next = current + r.Query.Skip + 1
|
||||
)
|
||||
if next <= current {
|
||||
infos, _ := json.MarshalIndent(p.Peer.Info(), "", " ")
|
||||
p.Log().Warn("GetBlockHeaders skip overflow attack", "current", current, "skip", r.Query.Skip, "next", next, "attacker", infos)
|
||||
infos, _ := json.Marshal(p.Peer.Info())
|
||||
p.Log().Warn("GetBlockHeaders skip overflow attack", "current", current, "skip", r.Query.Skip, "next", next, "attacker", string(infos))
|
||||
unknown = true
|
||||
} else {
|
||||
if header := bc.GetHeaderByNumber(next); header != nil {
|
||||
|
Reference in New Issue
Block a user