Fix block announcement validation (#171)

* Fix block announce

* Fix compilation
This commit is contained in:
Bastian Köcher
2020-08-04 15:19:36 +02:00
committed by GitHub
parent 2310ea3b81
commit 1f83a231c2
11 changed files with 413 additions and 239 deletions
-20
View File
@@ -14,29 +14,9 @@
// You should have received a copy of the GNU General Public License
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.
use std::{env, path::PathBuf};
use substrate_build_script_utils::{generate_cargo_keys, rerun_if_git_head_changed};
fn main() {
generate_cargo_keys();
rerun_if_git_head_changed();
let mut manifest_dir = PathBuf::from(
env::var("CARGO_MANIFEST_DIR").expect("`CARGO_MANIFEST_DIR` is always set by cargo."),
);
while manifest_dir.parent().is_some() {
if manifest_dir.join(".git/HEAD").exists() {
println!(
"cargo:rerun-if-changed={}",
manifest_dir.join(".git/HEAD").display()
);
return;
}
manifest_dir.pop();
}
println!("cargo:warning=Could not find `.git/HEAD` from manifest dir!");
}