Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Merge branch 'rpc-async' of github.com:ethcore/parity into rpc-async
Browse files Browse the repository at this point in the history
  • Loading branch information
debris committed Aug 29, 2016
2 parents 13d1787 + 60f6691 commit 9d053d9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
6 changes: 1 addition & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions rpc/src/v1/helpers/signing_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,10 +353,10 @@ mod test {
// Just wait for the other thread to start
thread::sleep(Duration::from_millis(100));
}
queue.request_confirmed(id, to_value(&NH256::from(H256::from(1))));
queue.request_confirmed(id, Ok(to_value(&NH256::from(H256::from(1)))));

// then
assert_eq!(handle.join().expect("Thread should finish nicely"), to_value(&NH256::from(H256::from(1))));
assert_eq!(handle.join().expect("Thread should finish nicely"), Ok(to_value(&NH256::from(H256::from(1)))));
}

#[test]
Expand Down
6 changes: 3 additions & 3 deletions rpc/src/v1/tests/mocked/eth_signing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ fn should_add_sign_to_queue() {
let async_result = tester.io.handle_request(&request).unwrap();
assert_eq!(tester.queue.requests().len(), 1);
// respond
tester.queue.request_confirmed(U256::from(1), to_value(&RpcH520::from(H520::default())));
tester.queue.request_confirmed(U256::from(1), Ok(to_value(&RpcH520::from(H520::default()))));
assert!(async_result.on_result(move |res| {
assert_eq!(res, response.to_owned());
}));
Expand Down Expand Up @@ -155,7 +155,7 @@ fn should_check_status_of_request_when_its_resolved() {
"id": 1
}"#;
tester.io.handle_request_sync(&request).expect("Sent");
tester.queue.request_confirmed(U256::from(1), to_value(&"Hello World!"));
tester.queue.request_confirmed(U256::from(1), Ok(to_value(&"Hello World!")));

// when
let request = r#"{
Expand Down Expand Up @@ -221,7 +221,7 @@ fn should_add_transaction_to_queue() {
let async_result = tester.io.handle_request(&request).unwrap();
assert_eq!(tester.queue.requests().len(), 1);
// respond
tester.queue.request_confirmed(U256::from(1), to_value(&RpcH256::from(H256::default())));
tester.queue.request_confirmed(U256::from(1), Ok(to_value(&RpcH256::from(H256::default()))));
assert!(async_result.on_result(move |res| {
assert_eq!(res, response.to_owned());
}));
Expand Down

0 comments on commit 9d053d9

Please sign in to comment.