SecretStore: Kovan flush2

This commit is contained in:
Svyatoslav Nikolsky 2017-11-15 10:42:13 +03:00
parent abfb9fccd3
commit 56875a83b3
3 changed files with 4 additions and 4 deletions

View File

@ -131,10 +131,10 @@ pub fn {snake_name}<F, U>(&self, call: F, {params}) -> BoxFuture<{output_type},
/// Encode "{abi_name}" function arguments. /// Encode "{abi_name}" function arguments.
/// Arguments: {abi_inputs:?} /// Arguments: {abi_inputs:?}
pub fn encode_{snake_name}_input(&self, {params}) -> Result<Bytes, String> {{ pub fn encode_{snake_name}_input(&self, {params}) -> Result<Vec<u8>, String> {{
self.contract.function(r#"{abi_name}"#) self.contract.function(r#"{abi_name}"#)
.expect("function existence checked at compile-time; qed") .expect("function existence checked at compile-time; qed")
.encode_input(&{to_tokens}) .encode_call({to_tokens})
.map_err(|e| format!("Error encoding call: {{:?}}", e)) .map_err(|e| format!("Error encoding call: {{:?}}", e))
}} }}
"##, "##,

View File

@ -84,6 +84,6 @@ pub fn start(client: Arc<Client>, self_key_pair: Arc<NodeKeyPair>, config: Servi
None => None, None => None,
}; };
let contract_listener = listener::service_contract_listener::ServiceContractListener::new(&client, key_server.clone(), self_key_pair); 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)) Ok(Box::new(listener))
} }

View File

@ -96,7 +96,7 @@ impl KeyServerHttpListener {
impl Drop for KeyServerHttpListener { impl Drop for KeyServerHttpListener {
fn drop(&mut self) { fn drop(&mut self) {
// ignore error as we are dropping anyway // ignore error as we are dropping anyway
self.http_server.take().map(|mut s| { let _ = s.close(); }); let _ = self.http_server.close();
} }
} }