Expand description
HOP maintenance: periodic promotion of near-expiry pool entries to permanent on-chain storage and cleanup of expired entries.
§Architecture
HopPromoter— trait for promoting data on-chain (trait-object friendly).RuntimeApiPromoter— concrete implementation that calls the HOP runtime API via dynamic dispatch (seecrate::runtime_api) plus [sc_transaction_pool_api::LocalTransactionPool].try_build_promoter— detects runtime API support at startup, returnsSome(promoter)or logs a warning and returnsNone.HopMaintenanceTask— background task combining promotion + cleanup.
Structs§
- HopMaintenance
Task - Background task that periodically promotes near-expiry HOP pool entries to permanent on-chain storage and cleans up expired entries.
- Runtime
ApiPromoter - Concrete
HopPromoterthat calls the HOP runtime API dynamically (seecrate::runtime_api) to build a promotion extrinsic and submits it to the local transaction pool.
Traits§
- HopPromoter
- Trait for promoting HOP data to permanent on-chain storage.
Functions§
- build_
maintenance_ task - Build a
HopMaintenanceTaskwired to the node’s client and transaction pool. - try_
build_ promoter - Try to build a
HopPromoterby detecting theHopRuntimeApiruntime API at the current best block.