-
Notifications
You must be signed in to change notification settings - Fork 699
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
vms/platformvm
: Remove EnableAdding
and DisableAdding
from Mempool
interface
#2463
Conversation
vms/platformvm
: Remove EnableAdding
and DisableAdding
vms/platformvm
: Remove EnableAdding
and DisableAdding
from Mempool
interface
@@ -192,9 +192,7 @@ func (b *builder) ShutdownBlockTimer() { | |||
// This method removes the transactions from the returned | |||
// blocks from the mempool. | |||
func (b *builder) BuildBlock(context.Context) (snowman.Block, error) { | |||
b.Mempool.DisableAdding() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to add some locking to the mempool now? I think there are a number of internal fields (like bytesAvailable
) modified on the call to Add
, for example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, the context lock is held when the Add
function is called
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
long outstayed its welcome
Why this should be merged
These methods were added to prevent an infinite recursion bug. This recursion no longer exists -> cleanup 🧹
How this works
Remove methods
How this was tested
CI