Updated some dependencies, got rid of Bitcoin stuff which wasn't in use

This commit is contained in:
Dave
2025-06-12 15:24:19 -04:00
parent 693ce3fafe
commit a8a5422ea8
12 changed files with 324 additions and 1455 deletions

View File

@@ -6,12 +6,12 @@ edition = "2021"
[dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tokio = { version = "1.35", features = ["full"] }
tokio = { version = "1.45.1", features = ["full"] }
async-trait = "0.1"
anyhow = "1.0"
rand = "0.8"
rand = "0.9.1"
chrono = "0.4"
colored = "2.0"
colored = "3.0.0"
[[bin]]
name = "oracle-demo"

View File

@@ -139,12 +139,12 @@ impl OracleNode {
}
fn submit_price(&self) {
let mut rng = rand::thread_rng();
let mut rng = rand::rng();
let price = if self.is_byzantine {
self.base_price * 1.2 // Try to manipulate 20% higher
} else {
self.base_price * (1.0 + rng.gen_range(-0.01..0.01))
self.base_price * (1.0 + rng.random_range(-0.01..0.01))
};
let attestation = PriceAttestation {