Skip to content

Commit

Permalink
reduce diff
Browse files Browse the repository at this point in the history
  • Loading branch information
dhrubabasu committed Nov 29, 2023
1 parent b331747 commit d469d88
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion vms/platformvm/block/builder/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ func New(
// This method removes the transactions from the returned
// blocks from the mempool.
func (b *builder) BuildBlock(context.Context) (snowman.Block, error) {
defer b.Mempool.RequestBuildBlock(false /*=emptyBlockPermitted*/)
b.Mempool.DisableAdding()
defer func() {
b.Mempool.EnableAdding()
b.Mempool.RequestBuildBlock(false /*=emptyBlockPermitted*/)
}()

ctx := b.txExecutorBackend.Ctx
ctx.Log.Debug("starting to attempt to build a block")
Expand Down

0 comments on commit d469d88

Please sign in to comment.