JoshOrndorff / recipes

A Hands-On Cookbook for Aspiring Blockchain Chefs
GNU General Public License v3.0
378 stars 187 forks source link

Unable to compile kitchen-node when use ocw-runtime #345

Closed Ljiacheng closed 4 years ago

Ljiacheng commented 4 years ago

When I enable the "ocw-runtime" in "/nodes/kitchen-node/ Cargo.toml" and run the command "cargo build --release --features ocw". I found that there is an error "cannot find value service in this scope" (/nodes/kitchen-node/src/service.rs line 112). I think the reason is that the "ServiceBuilder" was moved from "sc-service". We should change the way to run ocw service but I don't know how to code it.

JoshOrndorff commented 4 years ago

Thanks for reporting this issue @Turntogamer I've opened #346 which fixes this issue. Please give it a try and a review if you are able to.

Ljiacheng commented 4 years ago

Yes, I run it successfully. Thanks for your reply @JoshOrndorff. And in the https://substrate.dev/recipes/3-entrees/off-chain-workers/transactions.html, the function like "send_signed" was mentioned. But it seems to be changed in the new version. Please update the doc if you can.

JoshOrndorff commented 4 years ago

I'll open a new issue for that.

jimmychu0807 commented 4 years ago

This issue is addressed via https://github.com/substrate-developer-hub/recipes/pull/359

@Turntogamer Let me know if you spot more inconsistencies.