offchain storage lock (#6010)
* feat/offchain/storage: add remove interface method * feat/offchain/storeage: add remote to StorageValueRef * feat/offchain/storage: add storage lock * fix/review: Apply suggestions from code review Co-authored-by: Tomasz Drwięga <[email protected]> Co-authored-by: Peter Goodspeed-Niklaus <[email protected]> * refactor/offchain/storage/lock: introduce `Lockable` trait part 1 of 2 * chore/offchain/rename: _remove -> clean * feat/offchain/storage/lock: add TimeAndBlock based part 2 of 2 * fix/offchain/storage/lock: block and time expiry must be && not || * chore/offchain/storage: minor fmt doc comments * doc/comment: prefer markdown emphasis over CAPS * doc/comment: rewrap multiline module level docs * doc/comment: rephrase * impl sleep_until and use the actual time for the test env * feat/test: add more tests, ignore some sample impl doctests * fix/review: Apply suggestions from code review Co-authored-by: Nikolay Volf <[email protected]> * doc/comment: better description * fix/review: Apply suggestions from code review Co-authored-by: Nikolay Volf <[email protected]> * chore/storage: lifetime cleanup * fix/cleanup: trait bounds, cargo-spellcheck + extra explanations * fix/doc: periods +- * fix/review: Apply suggestions from code review Co-authored-by: Tomasz Drwięga <[email protected]> * cleanup: remove explicit lifetime bound, copy -> clone * fix/review: make trait Lockable contain only static, try_lock should not return Err(Option<L>), * chore/lifetimes: remove a couple of lifetime bounds which the compiler can figure out * refactor: migrate to an instant based * fix/feedback: fix, reduce, rename, docs update pending * docs/reword: adjust to changed code * fix/offchain/testing: timestamp and sleep_until shall not block * chore/lines: lines must < 100 chars * fix/docs: add missing pub field doc comments * refactor/x: try_lock does not need to return an Option<_> * refactor/simplify: a better way of waiting for a lock to resolve * docs: consistency * fix/line: < 100 * fix/doctest/use: avoid crate:: * fix/doctest: * * fix/review: remove unused trait bound * fix/review: pretty by const fn * fix/review: reduce default timeout to 20s * docs: grammar * fix/review: add with_block_deadline * doc: revamp BlockNumberProvider documentation to be less frame centric * chore: fmt * docs: add missing doc comment Co-authored-by: Bernhard Schuster <[email protected]> Co-authored-by: Tomasz Drwięga <[email protected]> Co-authored-by: Peter Goodspeed-Niklaus <[email protected]> Co-authored-by: Nikolay Volf <[email protected]>
parent
49b15615
Please register or sign in to comment