mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-10 04:51:20 +00:00
708ea9225d
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
31 lines
1.0 KiB
Go
31 lines
1.0 KiB
Go
package services
|
|
|
|
import (
|
|
"github.com/ledgerwatch/erigon/cmd/devnet/requests"
|
|
"github.com/ledgerwatch/log/v3"
|
|
)
|
|
|
|
func CheckTxPoolContent(reqGen *requests.RequestGenerator, expectedPendingSize, expectedQueuedSize, expectedBaseFeeSize int, logger log.Logger) {
|
|
pendingSize, queuedSize, baseFeeSize, err := requests.TxpoolContent(reqGen, logger)
|
|
if err != nil {
|
|
logger.Error("FAILURE getting txpool content", "error", err)
|
|
return
|
|
}
|
|
|
|
if pendingSize != expectedPendingSize {
|
|
logger.Error("FAILURE mismatched pending subpool size", "expected", expectedPendingSize, "got", pendingSize)
|
|
return
|
|
}
|
|
|
|
if queuedSize != expectedQueuedSize {
|
|
logger.Error("FAILURE mismatched queued subpool size", "expected", expectedQueuedSize, "got", queuedSize)
|
|
return
|
|
}
|
|
|
|
if baseFeeSize != expectedBaseFeeSize {
|
|
logger.Error("FAILURE mismatched basefee subpool size", "expected", expectedBaseFeeSize, "got", baseFeeSize)
|
|
}
|
|
|
|
logger.Info("SUCCESS => subpool sizes", "pending", pendingSize, "queued", queuedSize, "basefee", baseFeeSize)
|
|
}
|