HomePhabricator

Drop release times for CNode
cedaa7144628Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Drop release times for CNode

It seems there were two mechanisms for assessing whether a CNode
was still in use: a refcount and a release timestamp. The latter
seems to have been there for a long time, as a safety mechanism.

However, this timer also keeps CNode objects alive for far longer
than necessary after disconnects, potentially opening up a DoS
window.

This commit removes the timestamp-based mechanism, and replaces
it with an assert(nRefCount >= 0), to verify that the refcounting
is indeed correctly working.

Details

Provenance
Pieter Wuille <pieter.wuille@gmail.com>Authored on Mar 28 2013, 23:43
Pieter Wuille <sipa@ulyssis.org>Committed on Apr 4 2013, 12:45
deadalnixPushed on May 14 2017, 22:04
Parents
rABCaaf47eac3abe: Merge pull request #2423 from TheBlueMatt/limitedmapalreadyaskedfor
Branches
Unknown
Tags
Unknown

Event Timeline

Pieter Wuille <sipa@ulyssis.org> committed rABCcedaa7144628: Drop release times for CNode (authored by Pieter Wuille <pieter.wuille@gmail.com>).Apr 4 2013, 12:45