receipt, service
This commit is contained in:
parent
3f492d5ac2
commit
1b48d07a9c
@ -36,3 +36,19 @@ impl Encodable for Receipt {
|
||||
s.append(&self.logs);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use util::*;
|
||||
|
||||
#[test]
|
||||
fn it_can_be_encoded() {
|
||||
let mut rlp_stream = RlpStream::new();
|
||||
let receipt = Receipt::new(H256::zero(), U256::zero(), vec![]);
|
||||
rlp_stream.append(&receipt);
|
||||
|
||||
let out = rlp_stream.out();
|
||||
assert_eq!(out.len(), 297);
|
||||
}
|
||||
}
|
||||
|
@ -56,7 +56,6 @@ impl ClientService {
|
||||
/// Get client interface
|
||||
pub fn client(&self) -> Arc<Client> {
|
||||
self.client.clone()
|
||||
|
||||
}
|
||||
|
||||
/// Get network service component
|
||||
@ -98,3 +97,16 @@ impl IoHandler<NetSyncMessage> for ClientIoHandler {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use tests::helpers::*;
|
||||
use util::network::*;
|
||||
|
||||
#[test]
|
||||
fn it_can_be_started() {
|
||||
let spec = get_test_spec();
|
||||
let service = ClientService::start(spec, NetworkConfiguration::new());
|
||||
assert!(service.is_ok());
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user