cleanup unused txpool unused code

This commit is contained in:
jangko 2022-12-09 11:05:33 +07:00
parent 718f4991cf
commit b16b35caea
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
3 changed files with 0 additions and 48 deletions

View File

@ -901,40 +901,6 @@ proc addLocal*(xp: TxPoolRef;
xp.add(tx, "local tx")
ok()
# ------------------------------------------------------------------------------
# Legacy stuff -- will be removed, soon
# ------------------------------------------------------------------------------
proc jobAddTxs*(xp: TxPoolRef; txs: openArray[Transaction]; info = "")
{.gcsafe, raises: [Defect,CatchableError],
deprecated: "use add() instead".} =
xp.add(txs,info)
proc jobAddTx*(xp: TxPoolRef; tx: Transaction; info = "")
{.gcsafe,raises: [Defect,CatchableError],
deprecated: "use add() instead".} =
xp.add(tx,info)
proc jobDeltaTxsHead*(xp: TxPoolRef; newHead: BlockHeader): bool
{.gcsafe,raises: [Defect,CatchableError],
deprecated: "use smartHead() instead " &
"and remove the head= directive follwoing".} =
xp.smartHead(newHead)
proc jobCommit*(xp: TxPoolRef; forceMaintenance = false)
{.deprecated: "this function does nothing and can savely be removed".} =
discard
proc nJobs*(xp: TxPoolRef): int
{.deprecated: "this function returns always 0 and can savely be removed".} =
0
proc `head=`*(xp: TxPoolRef; val: BlockHeader)
{.gcsafe,raises: [Defect,CatchableError],
deprecated: "use smartHead(val,blindMode=true) instead although " &
"this function is unneccesary after running smartHead()".} =
discard xp.smartHead(val, true)
# ------------------------------------------------------------------------------
# End
# ------------------------------------------------------------------------------

View File

@ -53,10 +53,6 @@ const
# 95% <= #remote-deleted/#remote-present <= 1/95%
deletedItemsRatioBandPC = 95
# 70% <= #addr-local/#addr-remote <= 1/70%
# note: this ratio might vary due to timing race conditions
addrGroupLocalRemotePC = 70
# With a large enough block size, decreasing it should not decrease the
# profitability (very much) as the the number of blocks availabe increases
# (and a better choice might be available?) A good value for the next
@ -66,9 +62,6 @@ const
# Make some percentage of the accounts local accouns.
accountExtractPC = 10
# test block chain
networkId = GoerliNet # MainNet
var
minGasPrice = GasPrice.high
maxGasPrice = GasPrice.low
@ -525,9 +518,6 @@ proc runTxPoolTests(noisy = true) =
proc runTxPackerTests(noisy = true) =
let
elapNoisy = true # noisy
suite &"TxPool: Block packer tests":
var
ntBaseFee = 0.GasPrice
@ -535,7 +525,6 @@ proc runTxPackerTests(noisy = true) =
test &"Calculate some non-trivial base fee":
var
xq = bcCom.toTxPool(txList, noisy = noisy)
feesList = SortedSet[GasPriceEx,bool].init()
# provide a sorted list of gas fees
@ -737,7 +726,6 @@ proc runTxPackerTests(noisy = true) =
check xq.smartHead(backHeader) # move insertion point
# make sure that all txs have been added to the pool
let nFailed = xq.nItems.disposed - stats.disposed
check stats.disposed == 0
check stats.total + backTxs.len == xq.nItems.total

View File

@ -14,8 +14,6 @@ import
./test_txpool/helpers,
./macro_assembler
import ../nimbus/utils/debug
const
baseDir = [".", "tests"]
repoDir = [".", "customgenesis"]