JoshOrndorff / recipes

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

New Recipe: Manual Select Chain #428

Open JoshOrndorff opened 3 years ago

JoshOrndorff commented 3 years ago

The best chain is chosen by a "select chain rule" https://substrate.dev/rustdocs/v3.0.0/sp_consensus/trait.SelectChain.html . The most common implementation, and the one used in all current recipes nodes, is the standard "longest chain rule" https://substrate.dev/rustdocs/v3.0.0/sc_consensus/struct.LongestChain.html.

We could (and I would love to) impl SelectChain for ManualSelectChain which gets wired back to the RPC to be controlled manually by the user just like manual seal.

cc @girazoki