Skip to content

Commit

Permalink
fix testcases
Browse files Browse the repository at this point in the history
  • Loading branch information
temaniarpit27 committed Sep 23, 2023
1 parent 5848a0c commit c763560
Show file tree
Hide file tree
Showing 12 changed files with 1,042 additions and 1,297 deletions.
19 changes: 8 additions & 11 deletions consensus/bor/api/caller_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions core/txpool/blobpool/blobpool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ func makeAddressReserver() txpool.AddressReserver {
}
}

func MakeAddressReserver() {
makeAddressReserver()
}

// makeTx is a utility method to construct a random blob transaction and sign it
// with a valid key, only setting the interesting fields from the perspective of
// the blob pool.
Expand Down
9 changes: 8 additions & 1 deletion core/txpool/legacypool/legacypool.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,8 @@ type LegacyPool struct {
initDoneCh chan struct{} // is closed once the pool is initialized (for tests)

changesSinceReorg int // A counter for how many drops we've performed in-between reorg.

promoteTxCh chan struct{} // should be used only for tests
}

type txpoolResetRequest struct {
Expand All @@ -249,7 +251,7 @@ type txpoolResetRequest struct {

// New creates a new transaction pool to gather, sort and filter inbound
// transactions from the network.
func New(config Config, chain BlockChain) *LegacyPool {
func New(config Config, chain BlockChain, options ...func(pool *LegacyPool)) *LegacyPool {
// Sanitize the input to ensure no vulnerable gas prices are set
config = (&config).sanitize()

Expand Down Expand Up @@ -280,6 +282,11 @@ func New(config Config, chain BlockChain) *LegacyPool {
if !config.NoLocals && config.Journal != "" {
pool.journal = newTxJournal(config.Journal)
}

// apply options
for _, fn := range options {
fn(pool)
}
return pool
}

Expand Down
Loading

0 comments on commit c763560

Please sign in to comment.