Skip to content

Commit

Permalink
add abort to node start if diem-vm was built with testing feature
Browse files Browse the repository at this point in the history
  • Loading branch information
0o-de-lally committed Aug 20, 2024
1 parent 58c37cb commit 141ace3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions tools/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ clap = { workspace = true }
diem = { workspace = true }
diem-config = { workspace = true }
diem-node = { workspace = true }
diem-vm = { workspace = true }
libra-config = { workspace = true }
libra-framework = { workspace = true }
libra-genesis-tools = { workspace = true }
Expand Down
4 changes: 3 additions & 1 deletion tools/cli/src/node_cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ impl NodeCli {
// Production code should never have been compiled with
// Test helpers in the MoveVm. This fuction is a safety check.
// Check that we are not including any Move test natives
// diem_vm::natives::assert_no_test_natives(ERROR_MSG_BAD_FEATURE_FLAGS);
diem_vm::natives::assert_no_test_natives(
"SCARY: somehow your production binaries ended up with testing features. Aborting!",
);

// validators typically aren't looking for verbose logs.
// but they can set it if they wish with RUST_LOG=info
Expand Down

0 comments on commit 141ace3

Please sign in to comment.