Skip to content

Commit

Permalink
Merge branch 'dev' into update-versions-v1.10.16
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenButtolph authored Nov 22, 2023
2 parents ba534fa + 4ce0d67 commit 24dd139
Show file tree
Hide file tree
Showing 11 changed files with 148 additions and 482 deletions.
2 changes: 1 addition & 1 deletion vms/platformvm/block/builder/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ func buildBlock(
}

// Clean out the mempool's transactions with invalid timestamps.
droppedStakerTxIDs := mempool.DropExpiredStakerTxs(builder.Mempool, timestamp.Add(txexecutor.SyncBound))
droppedStakerTxIDs := builder.Mempool.DropExpiredStakerTxs(timestamp.Add(txexecutor.SyncBound))
for _, txID := range droppedStakerTxIDs {
builder.txExecutorBackend.Ctx.Log.Debug("dropping tx",
zap.Stringer("txID", txID),
Expand Down
10 changes: 5 additions & 5 deletions vms/platformvm/block/builder/builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ func TestBuildBlock(t *testing.T) {
mempool := mempool.NewMockMempool(ctrl)

// There are txs.
mempool.EXPECT().HasStakerTx().Return(false)
mempool.EXPECT().DropExpiredStakerTxs(gomock.Any()).Return([]ids.ID{})
mempool.EXPECT().HasTxs().Return(true)
mempool.EXPECT().PeekTxs(targetBlockSize).Return(transactions)
return &builder{
Expand Down Expand Up @@ -448,7 +448,7 @@ func TestBuildBlock(t *testing.T) {
mempool := mempool.NewMockMempool(ctrl)

// There are no txs.
mempool.EXPECT().HasStakerTx().Return(false)
mempool.EXPECT().DropExpiredStakerTxs(gomock.Any()).Return([]ids.ID{})
mempool.EXPECT().HasTxs().Return(false)

clk := &mockable.Clock{}
Expand Down Expand Up @@ -496,7 +496,7 @@ func TestBuildBlock(t *testing.T) {
mempool := mempool.NewMockMempool(ctrl)

// There are no txs.
mempool.EXPECT().HasStakerTx().Return(false)
mempool.EXPECT().DropExpiredStakerTxs(gomock.Any()).Return([]ids.ID{})
mempool.EXPECT().HasTxs().Return(false)
mempool.EXPECT().PeekTxs(targetBlockSize).Return(nil)

Expand Down Expand Up @@ -551,7 +551,7 @@ func TestBuildBlock(t *testing.T) {
mempool := mempool.NewMockMempool(ctrl)

// There is a tx.
mempool.EXPECT().HasStakerTx().Return(false)
mempool.EXPECT().DropExpiredStakerTxs(gomock.Any()).Return([]ids.ID{})
mempool.EXPECT().HasTxs().Return(true)
mempool.EXPECT().PeekTxs(targetBlockSize).Return([]*txs.Tx{transactions[0]})

Expand Down Expand Up @@ -605,7 +605,7 @@ func TestBuildBlock(t *testing.T) {

// There are no decision txs
// There is a staker tx.
mempool.EXPECT().HasStakerTx().Return(false)
mempool.EXPECT().DropExpiredStakerTxs(gomock.Any()).Return([]ids.ID{})
mempool.EXPECT().HasTxs().Return(true)
mempool.EXPECT().PeekTxs(targetBlockSize).Return([]*txs.Tx{transactions[0]})

Expand Down
95 changes: 0 additions & 95 deletions vms/platformvm/txs/mempool/issuer.go

This file was deleted.

Loading

0 comments on commit 24dd139

Please sign in to comment.