From 56875a83b3d512c0ac8cc3861367ccec96117392 Mon Sep 17 00:00:00 2001 From: Svyatoslav Nikolsky Date: Wed, 15 Nov 2017 10:42:13 +0300 Subject: [PATCH] SecretStore: Kovan flush2 --- ethcore/native_contracts/generator/src/lib.rs | 4 ++-- secret_store/src/lib.rs | 2 +- secret_store/src/listener/http_listener.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ethcore/native_contracts/generator/src/lib.rs b/ethcore/native_contracts/generator/src/lib.rs index 0c545abaf..be71fc395 100644 --- a/ethcore/native_contracts/generator/src/lib.rs +++ b/ethcore/native_contracts/generator/src/lib.rs @@ -131,10 +131,10 @@ pub fn {snake_name}(&self, call: F, {params}) -> BoxFuture<{output_type}, /// Encode "{abi_name}" function arguments. /// Arguments: {abi_inputs:?} -pub fn encode_{snake_name}_input(&self, {params}) -> Result {{ +pub fn encode_{snake_name}_input(&self, {params}) -> Result, String> {{ self.contract.function(r#"{abi_name}"#) .expect("function existence checked at compile-time; qed") - .encode_input(&{to_tokens}) + .encode_call({to_tokens}) .map_err(|e| format!("Error encoding call: {{:?}}", e)) }} "##, diff --git a/secret_store/src/lib.rs b/secret_store/src/lib.rs index 31a93f012..c93c3c5dd 100644 --- a/secret_store/src/lib.rs +++ b/secret_store/src/lib.rs @@ -84,6 +84,6 @@ pub fn start(client: Arc, self_key_pair: Arc, config: Servi None => None, }; let contract_listener = listener::service_contract_listener::ServiceContractListener::new(&client, key_server.clone(), self_key_pair); - let listener = listener::Listener::new(key_server, Some(http_listener), Some(contract_listener)); + let listener = listener::Listener::new(key_server, http_listener, Some(contract_listener)); Ok(Box::new(listener)) } diff --git a/secret_store/src/listener/http_listener.rs b/secret_store/src/listener/http_listener.rs index c9f2acf16..cb6530f40 100644 --- a/secret_store/src/listener/http_listener.rs +++ b/secret_store/src/listener/http_listener.rs @@ -96,7 +96,7 @@ impl KeyServerHttpListener { impl Drop for KeyServerHttpListener { fn drop(&mut self) { // ignore error as we are dropping anyway - self.http_server.take().map(|mut s| { let _ = s.close(); }); + let _ = self.http_server.close(); } }