Why Nostr? What is Njump?
2023-06-07 18:00:55
in reply to

Suhas Daftuar [ARCHIVE] on Nostr: 📅 Original date posted:2017-05-08 📝 Original message:Hi, I've moved the ...

📅 Original date posted:2017-05-08
📝 Original message:Hi,

I've moved the bitcoin-dev list to bcc:, as this question is better suited
to forums dedicated to Bitcoin Core implementation specifics, rather than
the general bitcoin development list.

Please feel free in the future to ask questions like this on the
bitcoin-core-dev mailing list (https://lists.linuxfoundation
.org/mailman/listinfo/bitcoin-core-dev) or on the #bitcoin-core-dev
freenode IRC channel.

The work limit (that was put in place in https://github.com/bitcoin/
bitcoin/pull/6654, when the concept of "dirty" entries was introduced) was
removed in https://github.com/bitcoin/bitcoin/pull/7594, in preparation for
ancestor-feerate-mining. So those comments should have been cleaned up to
match the new code.

Please feel free to file an issue or open a PR to update those comments at
https://github.com/bitcoin/bitcoin.

Thanks,
Suhas


On Mon, May 8, 2017 at 5:38 AM, DJ Bitcoin via bitcoin-dev <
bitcoin-dev at lists.linuxfoundation.org> wrote:

> Hi Guys,
>
> I have a question about the use of txmempool. find attached the code in
> txmempool.h
>
>
> ======================================================
> /* Adding transactions from a disconnected block can be very time
> consuming,
> * because we don't have a way to limit the number of in-mempool
> descendants.
> * To bound CPU processing, we limit the amount of work we're willing to do
> * to properly update the descendant information for a tx being added from
> * a disconnected block. If we would exceed the limit, then we instead
> mark
> * the entry as "dirty", and set the feerate for sorting purposes to be
> equal
> * the feerate of the transaction without any descendants. */
>
> class CTxMemPoolEntry
> {
> private:
> // ...
> // Information about descendants of this transaction that are in the
> // mempool; if we remove this transaction we must remove all of these
> // descendants as well. if nCountWithDescendants is 0, treat this entry
> as
> // dirty, and nSizeWithDescendants and nModFeesWithDescendants will not
> be
> // correct.
>
> int64_t nCountWithDescendants; //!< number of descendant transactions
> // ...
> ======================================================
>
>
> Now, the only place where nCountWithDescendants is modified is the
> following (txmempool.cpp):
>
>
> ======================================================
> void CTxMemPoolEntry::UpdateDescendantState(int64_t modifySize, CAmount
> modifyFee, int64_t modifyCount)
> {
> nSizeWithDescendants += modifySize;
> assert(int64_t(nSizeWithDescendants) > 0);
> nModFeesWithDescendants += modifyFee;
> nCountWithDescendants += modifyCount;
> assert(int64_t(nCountWithDescendants) > 0);
> }
> ======================================================
>
>
> Therefore, nCountWithDescendants is never zero.
> Am i missing something? Where is this concept of "dirty" defined?
>
> Thanks a lot,
> DJ
>
>
>
>
>
>
> _______________________________________________
> bitcoin-dev mailing list
> bitcoin-dev at lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20170508/dfb5c9f0/attachment.html>;
Author Public Key
npub1ss2s89s938xfh3zzz0j2mhp25tlrlcrj0duljr0ne0t8v2r4cv0q5e0am4