mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-07 00:42:42 +00:00
Add cfg! check for fake_crypto (#633)
* Add cfg! check for fake_crypto * Remove function attribute and update in-code cfg! checks
This commit is contained in:
@@ -326,10 +326,12 @@ fn validator_block_post() {
|
|||||||
.runtime()
|
.runtime()
|
||||||
.block_on(remote_node.http.validator().publish_block(block.clone()))
|
.block_on(remote_node.http.validator().publish_block(block.clone()))
|
||||||
.expect("should publish block");
|
.expect("should publish block");
|
||||||
assert!(
|
if cfg!(not(feature = "fake_crypto")) {
|
||||||
!publish_status.is_valid(),
|
assert!(
|
||||||
"the unsigned published block should not be valid"
|
!publish_status.is_valid(),
|
||||||
);
|
"the unsigned published block should not be valid"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
sign_block(beacon_chain.clone(), &mut block, spec);
|
sign_block(beacon_chain.clone(), &mut block, spec);
|
||||||
let block_root = block.canonical_root();
|
let block_root = block.canonical_root();
|
||||||
@@ -338,11 +340,14 @@ fn validator_block_post() {
|
|||||||
.runtime()
|
.runtime()
|
||||||
.block_on(remote_node.http.validator().publish_block(block.clone()))
|
.block_on(remote_node.http.validator().publish_block(block.clone()))
|
||||||
.expect("should publish block");
|
.expect("should publish block");
|
||||||
assert_eq!(
|
|
||||||
publish_status,
|
if cfg!(not(feature = "fake_crypto")) {
|
||||||
PublishStatus::Valid,
|
assert_eq!(
|
||||||
"the signed published block should be valid"
|
publish_status,
|
||||||
);
|
PublishStatus::Valid,
|
||||||
|
"the signed published block should be valid"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
let head = env
|
let head = env
|
||||||
.runtime()
|
.runtime()
|
||||||
|
|||||||
Reference in New Issue
Block a user