mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-20 04:35:41 +00:00
Offchain Workers: Example Pallet (#4989)
* Example of offchain worker pallet. * Fix compilation issues. * Use serde_json to parse JSON. * Add some basic tests. * Working on docs. * Fix compilation * Finish docs for signed. * Work on unsigned send. * Add some tests and missing docs. * Add example of StorageValueRef * Add weight. * Extra \n * Fix im-online test. * Bump runtime. * Fix tests. * Apply suggestions from code review Co-Authored-By: Joshy Orndorff <JoshOrndorff@users.noreply.github.com> Co-Authored-By: Gavin Wood <gavin@parity.io> * Address review comments. Co-authored-by: Joshy Orndorff <JoshOrndorff@users.noreply.github.com> Co-authored-by: Gavin Wood <github@gavwood.com>
This commit is contained in:
@@ -341,8 +341,6 @@ decl_module! {
|
||||
|
||||
// Runs after every block.
|
||||
fn offchain_worker(now: T::BlockNumber) {
|
||||
debug::RuntimeLogger::init();
|
||||
|
||||
// Only send messages if we are a potential validator.
|
||||
if sp_io::offchain::is_validator() {
|
||||
for res in Self::send_heartbeats(now).into_iter().flatten() {
|
||||
|
||||
Reference in New Issue
Block a user