Skip to content

BIP119: Fix plotting of pending transactions for congestion control rates #1898

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bip-0119/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ def make_patch_spines_invisible(ax):


par1.set_ylabel("Confirmed but Pending Transactions")
p4, = par1.plot(blocktimes_c1, unspendable2, "c", label="Congestion Control Pending (2x Rate)")
p4, = par1.plot(blocktimes_c2, unspendable, "r", label="Congestion Control Pending (1x Rate)")
p4, = par1.plot(blocktimes_c1, unspendable, "c", label="Congestion Control Pending (1x Rate)")
p4b, = par1.plot(blocktimes_c2, unspendable2, "r", label="Congestion Control Pending (2x Rate)")
Copy link
Contributor

@murchandamus murchandamus Jul 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your comment explains what you did, but could you please further explain why the labels of the two lines should be swapped?

I’m also not sure whether the repetition of p4 in the original was a bug, but the change from p4 to p4b looks like a mistake, as p4b never appears again in this file.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your comment explains what you did, but could you please further explain why the labels of the two lines should be swapped?

I’m also not sure whether the repetition of p4 in the original was a bug, but the change from p4 to p4b looks like a mistake, as p4b never appears again in this file.

Now for 1x speed blocktimes_c1 and unspendable are used, and for 2x speed blocktimes_c2 and unspendable2 are used. This matches the simulation logic.
Labels now correctly reflect the data being displayed.
The second line uses a separate p4b variable, allowing both lines to be accessed if needed.

par1.yaxis.label.set_color(p4.get_color())


Expand Down