Skip to content

Scheduled Txs: Use binary search in FlowTransactionScheduler #526

@joshuahannan

Description

@joshuahannan

Issue To Be Solved

There are two instances in FlowTransactionScheduler where we insert values into a sorted array where binary search would be more performant

Suggest A Solution

  1. Update SortedTimestamps to use binary search
  2. Update canceledTransactions to use binary search in cancel()

Context

Can use https://github.com/versus-flow/versus-contracts/blob/4fda8e3203b25fa75b6ba04193699722b86243c9/contracts/DutchAuction.cdc#L335
as an example

Metadata

Metadata

Assignees

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions