test: Improve block header test assertion
Don't be lazy, check the actual number.
This commit is contained in:
@@ -129,7 +129,7 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn get_block_header_test() {
|
async fn get_block_header() {
|
||||||
let eth_rpc_url = env::var("RPC_URL").expect("Missing RPC_URL in environment");
|
let eth_rpc_url = env::var("RPC_URL").expect("Missing RPC_URL in environment");
|
||||||
|
|
||||||
let rpc_provider = RPCProvider::new(eth_rpc_url);
|
let rpc_provider = RPCProvider::new(eth_rpc_url);
|
||||||
@@ -142,8 +142,6 @@ mod tests {
|
|||||||
|
|
||||||
// Verify that we got a block with the correct number
|
// Verify that we got a block with the correct number
|
||||||
assert_eq!(block_number, block_header.header.number);
|
assert_eq!(block_number, block_header.header.number);
|
||||||
|
assert_eq!(block_header.header.timestamp, 1741393115);
|
||||||
// Verify that the timestamp is non-zero
|
|
||||||
assert!(block_header.header.timestamp > 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user