Fix compilation errors
This commit is contained in:
parent
26e253e554
commit
544725a018
@ -112,7 +112,7 @@ ci-skip-tests = []
|
||||
# Run memory/cpu heavy tests.
|
||||
test-heavy = []
|
||||
# Compile test helpers
|
||||
test-helpers = ["tempdir", "kvdb-rocksdb", "blooms-db"]
|
||||
test-helpers = ["tempdir", "kvdb-rocksdb", "blooms-db", "common-types/test-helpers"]
|
||||
# Enables slow 'to-pod-full' method for use in tests and evmbin.
|
||||
to-pod-full = []
|
||||
|
||||
|
@ -303,7 +303,7 @@ impl<'x> OpenBlock<'x> {
|
||||
warn!(
|
||||
"Heavy ({} ms) transaction in block {:?}: {:?}",
|
||||
took_ms,
|
||||
self.block.header().number(),
|
||||
self.block.header.number(),
|
||||
hash
|
||||
);
|
||||
}
|
||||
|
@ -113,6 +113,8 @@ extern crate env_logger;
|
||||
extern crate ethcore_accounts as accounts;
|
||||
#[cfg(feature = "stratum")]
|
||||
extern crate ethcore_stratum;
|
||||
#[cfg(any(test, feature = "test-helpers"))]
|
||||
extern crate kvdb_memorydb;
|
||||
#[cfg(any(test, feature = "kvdb-rocksdb"))]
|
||||
extern crate kvdb_rocksdb;
|
||||
#[cfg(test)]
|
||||
|
@ -128,20 +128,32 @@ pub fn request(address: &SocketAddr, request: &str) -> Response {
|
||||
pub fn assert_security_headers_present(headers: &[String], port: Option<u16>) {
|
||||
if port.is_none() {
|
||||
assert!(
|
||||
headers.iter().any(|header| header.as_str() == "X-Frame-Options: SAMEORIGIN")
|
||||
"X-Frame-Options: SAMEORIGIN missing: {:?}", headers
|
||||
headers
|
||||
.iter()
|
||||
.any(|header| header.as_str() == "X-Frame-Options: SAMEORIGIN"),
|
||||
"X-Frame-Options: SAMEORIGIN missing: {:?}",
|
||||
headers
|
||||
);
|
||||
}
|
||||
assert!(
|
||||
headers.iter().any(|header| header.as_str() == "X-XSS-Protection: 1; mode=block")
|
||||
"X-XSS-Protection missing: {:?}", headers
|
||||
headers
|
||||
.iter()
|
||||
.any(|header| header.as_str() == "X-XSS-Protection: 1; mode=block"),
|
||||
"X-XSS-Protection missing: {:?}",
|
||||
headers
|
||||
);
|
||||
assert!(
|
||||
headers.iter().any(|header| header.as_str() == "X-Content-Type-Options: nosniff")
|
||||
"X-Content-Type-Options missing: {:?}", headers
|
||||
headers
|
||||
.iter()
|
||||
.any(|header| header.as_str() == "X-Content-Type-Options: nosniff"),
|
||||
"X-Content-Type-Options missing: {:?}",
|
||||
headers
|
||||
);
|
||||
assert!(
|
||||
headers.iter().any(|header| header.starts_with("Content-Security-Policy: "))
|
||||
"Content-Security-Policy missing: {:?}", headers
|
||||
headers
|
||||
.iter()
|
||||
.any(|header| header.starts_with("Content-Security-Policy: ")),
|
||||
"Content-Security-Policy missing: {:?}",
|
||||
headers
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user