-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Updating the witness map is a fairly expensive operation, since we must append new nodes to a tree. This operation is linear to the amount of notes that haven't been spent yet, and each insertion is logarithmic. In total, we spendO(N log N) time, which is less than ideal, since that code is run from an async context.
Since this blocks tokio from yielding the current worker thread, we should resort to tokio::task::block_in_place around this for loop.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request