From 44bfd417acad2fc879121e178d7312849653b3c5 Mon Sep 17 00:00:00 2001
From: Xiliang Chen <xlchen1291@gmail.com>
Date: Fri, 15 Nov 2019 08:35:23 +0800
Subject: [PATCH] fix oracle (#29)

* fix oracle

* fix warning
---
 auction/src/mock.rs             |  2 --
 oracle/Cargo.toml               |  3 +--
 oracle/src/operator_provider.rs | 10 ++++++++++
 3 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/auction/src/mock.rs b/auction/src/mock.rs
index 57d4d9a..267e1bb 100644
--- a/auction/src/mock.rs
+++ b/auction/src/mock.rs
@@ -56,8 +56,6 @@ impl system::Trait for Runtime {
 	type Version = ();
 }
 
-pub type System = system::Module<Runtime>;
-
 pub struct Handler;
 
 impl AuctionHandler<AccountId, Balance, BlockNumber, AuctionId> for Handler {
diff --git a/oracle/Cargo.toml b/oracle/Cargo.toml
index 1c799c2..c846569 100644
--- a/oracle/Cargo.toml
+++ b/oracle/Cargo.toml
@@ -17,7 +17,7 @@ utilities = { package = "orml-utilities", path = "../utilities", default-feature
 primitives = { git = "https://github.com/paritytech/substrate.git", package = "substrate-primitives", default-features = false }
 
 [dev-dependencies]
-timestamp = { package = "srml-timestamp",  git = "https://github.com/paritytech/substrate.git", default-features = false }
+timestamp = { package = "srml-timestamp",  git = "https://github.com/paritytech/substrate.git" }
 
 
 [features]
@@ -33,5 +33,4 @@ std = [
 	"traits/std",
 	"utilities/std",
 	"primitives/std",
-	"timestamp/std",
 ]
diff --git a/oracle/src/operator_provider.rs b/oracle/src/operator_provider.rs
index 39be594..2034d8a 100644
--- a/oracle/src/operator_provider.rs
+++ b/oracle/src/operator_provider.rs
@@ -7,3 +7,13 @@ pub trait OperatorProvider<AccountId> {
 	// return a list of operators
 	fn operators() -> Vec<AccountId>;
 }
+
+impl<AccountId> OperatorProvider<AccountId> for () {
+	fn can_feed_data(_who: &AccountId) -> bool {
+		false
+	}
+
+	fn operators() -> Vec<AccountId> {
+		Vec::new()
+	}
+}
-- 
GitLab