Skip to content

Commit

Permalink
initial input/ordering txs split
Browse files Browse the repository at this point in the history
  • Loading branch information
kushti committed Jan 14, 2025
1 parent 5773c17 commit 41f2d59
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/main/scala/org/ergoplatform/mining/CandidateGenerator.scala
Original file line number Diff line number Diff line change
Expand Up @@ -548,15 +548,21 @@ object CandidateGenerator extends ScorexLogging {
version
)

val transactionCandidates = emissionTxOpt.toSeq ++ prioritizedTransactions ++ poolTxs.map(_.transaction)
// returns txs which may and may not be included into input-block
def filterInputBlockTransactions(candidates: Seq[ErgoTransaction]): (Seq[ErgoTransaction], Seq[ErgoTransaction]) = {
(candidates, Seq.empty) // todo: real implemenation
}

val (inputBlockTransactionCandidates, txsNotIncludedIntoInput) = filterInputBlockTransactions(prioritizedTransactions ++ poolTxs.map(_.transaction))
val orderingBlocktransactionCandidates = emissionTxOpt.toSeq ++ inputBlockTransactionCandidates ++ txsNotIncludedIntoInput

val (txs, toEliminate) = collectTxs(
minerPk,
state.stateContext.currentParameters.maxBlockCost - safeGap,
state.stateContext.currentParameters.maxBlockSize,
state,
upcomingContext,
transactionCandidates
orderingBlocktransactionCandidates
)

val eliminateTransactions = EliminateTransactions(toEliminate)
Expand Down

0 comments on commit 41f2d59

Please sign in to comment.