Skip to content

Commit

Permalink
(unfinished) offer to checktx dst queue
Browse files Browse the repository at this point in the history
  • Loading branch information
pro-wh committed May 27, 2022
1 parent a15877d commit 8f18c8c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions go/runtime/txpool/txpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -564,9 +564,9 @@ func (t *txPool) checkTxBatch(ctx context.Context, rr host.RichRuntime) {
for i, tx := range newTxs {
// todo: hash used to be cached
h := hash.NewFromBytes(tx.tx)
// todo: get queue reference from metadata
var someRecheckable RecheckableTransactionStore
someRecheckable.OfferChecked(tx.tx)
if tx.dstQueue != nil {
tx.dstQueue.OfferChecked(tx.tx)
}
// todo: notify submitter if it falls off the queue immediately
if false {
t.logger.Error("unable to queue transaction for scheduling",
Expand Down Expand Up @@ -608,6 +608,8 @@ func (t *txPool) checkTxBatch(ctx context.Context, rr host.RichRuntime) {
_ = t.seenCache.Put(h, publishTime)
}

// todo: unpark republish queue?

// Notify subscribers that we have received new transactions.
t.checkTxNotifier.Broadcast(newTxs)
t.schedulerNotifier.Broadcast(false)
Expand Down

0 comments on commit 8f18c8c

Please sign in to comment.