mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-07 13:18:43 +02:00
txgraph: add work limit to DoWork(), try optimal (feature)
This adds an `iters` parameter to DoWork(), which controls how much work it is allowed to do right now. Additionally, DoWork() won't stop at just getting everything ACCEPTABLE, but if there is work budget left, will also attempt to get every cluster linearized optimally.
This commit is contained in:
@@ -94,9 +94,10 @@ public:
|
||||
virtual void SetTransactionFee(const Ref& arg, int64_t fee) noexcept = 0;
|
||||
|
||||
/** TxGraph is internally lazy, and will not compute many things until they are needed.
|
||||
* Calling DoWork will compute everything now, so that future operations are fast. This can be
|
||||
* invoked while oversized. */
|
||||
virtual void DoWork() noexcept = 0;
|
||||
* Calling DoWork will perform some work now (controlled by iters) so that future operations
|
||||
* are fast, if there is any. Returns whether all currently-available work is done. This can
|
||||
* be invoked while oversized, but oversized graphs will be skipped by this call. */
|
||||
virtual bool DoWork(uint64_t iters) noexcept = 0;
|
||||
|
||||
/** Create a staging graph (which cannot exist already). This acts as if a full copy of
|
||||
* the transaction graph is made, upon which further modifications are made. This copy can
|
||||
|
||||
Reference in New Issue
Block a user