Skip to content
Commit c06e5569 authored by JesseAbram's avatar JesseAbram Committed by GitHub
Browse files

Add on_idle hook (#8209)



* add in idle hook

* remaining weight passed through to on_idle

* added weight return

* remove TODO

* weight adjustment fix

* added adjusted weight into tuple

* Update frame/support/src/dispatch.rs

Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>

* Update frame/support/src/dispatch.rs

Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>

* Update frame/support/src/dispatch.rs

Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>

* Update frame/support/src/dispatch.rs

Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>

* Update frame/support/src/dispatch.rs

Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>

* Update frame/support/src/dispatch.rs

Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>

* Update frame/support/src/dispatch.rs

Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>

* compile errors for on_idle in dispatch

* Update frame/support/src/dispatch.rs

Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>

* Update frame/support/src/dispatch.rs

Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>

* Update frame/support/src/dispatch.rs

Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>

* on idle tuple clean up

* register reduced weight

* collect and add reduced wait from on idle call

* better demo example

* Update frame/support/procedural/src/pallet/expand/hooks.rs

Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>

* added tests to dispatch.rs

* idle test on executive

* skip on idle if remaining weight is 0

* Update frame/executive/src/lib.rs

Co-authored-by: default avatarAlexander Popiak <[email protected]>

* Update frame/support/src/dispatch.rs

Co-authored-by: default avatarAlexander Popiak <[email protected]>

* abstract common logic out to functions

* docs

* remove demo example

* remove debug

* spacing

* docs

* revert template pallet to master

* change reduced weight to used weight

* remove empty line

* lint

* spacing

* Update frame/support/src/traits.rs

Co-authored-by: default avatarShawn Tabrizi <[email protected]>

* documentation

* Update frame/support/procedural/src/pallet/expand/hooks.rs

Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>

* docs

* Update frame/support/src/traits.rs

Co-authored-by: default avatarAlexander Popiak <[email protected]>

* docs

* Update frame/support/src/traits.rs

Co-authored-by: default avatarAlexander Popiak <[email protected]>

* Update frame/support/src/traits.rs

Co-authored-by: default avatarAlexander Popiak <[email protected]>

* Update frame/support/src/traits.rs

Co-authored-by: default avatarAlexander Popiak <[email protected]>

Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
Co-authored-by: default avatarAlexander Popiak <[email protected]>
Co-authored-by: default avatarShawn Tabrizi <[email protected]>
parent fb4b9755
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment