diff --git a/README.md b/README.md index 5afd9b4f..5fd415b6 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ Quick overview of the current status, providing implementation progress and test | [![conf_006](https://img.shields.io/badge/006-██████████-green) ](SPEC.md#ZG-CONFORMANCE-006)| :warning: Need to confirm expected behaviour with zcash. | [![conf_007](https://img.shields.io/badge/007-██████████-red) ](SPEC.md#ZG-CONFORMANCE-007)| :warning: Need to confirm expected behaviour with zcash. | [![conf_008](https://img.shields.io/badge/008-████░░░░░░-red) ](SPEC.md#ZG-CONFORMANCE-008)| :warning: Need to confirm expected behaviour with zcash. -| [![conf_009](https://img.shields.io/badge/009-██████░░░░-green) ](SPEC.md#ZG-CONFORMANCE-009)| +| [![conf_009](https://img.shields.io/badge/009-██████████-green) ](SPEC.md#ZG-CONFORMANCE-009)| | [![conf_010](https://img.shields.io/badge/010-██████████-red) ](SPEC.md#ZG-CONFORMANCE-010)| | [![conf_011](https://img.shields.io/badge/011-░░░░░░░░░░-inactive)](SPEC.md#ZG-CONFORMANCE-011)| | [![conf_012](https://img.shields.io/badge/012-██████████-red) ](SPEC.md#ZG-CONFORMANCE-012)| :warning: Zcashd node config requires investigation. diff --git a/src/tests/conformance/messages.rs b/src/tests/conformance/messages.rs index 60604118..dab88e93 100644 --- a/src/tests/conformance/messages.rs +++ b/src/tests/conformance/messages.rs @@ -158,17 +158,16 @@ async fn ignores_unsolicited_responses() { .await .unwrap(); - // TODO: rest of the message types let test_messages = vec![ Message::Pong(Nonce::default()), Message::Headers(Headers::empty()), Message::Addr(Addr::empty()), - // Block(Block), - // NotFound(Inv), - // Tx(Tx), + Message::Block(Box::new(Block::testnet_genesis())), + Message::NotFound(Inv::new(vec![Block::testnet_1().txs[0].inv_hash()])), + Message::Tx(Block::testnet_2().txs[0].clone()), ]; - let filter = MessageFilter::with_all_auto_reply().enable_logging(); + let filter = MessageFilter::with_all_auto_reply(); for message in test_messages { message.write_to_stream(&mut stream).await.unwrap(); @@ -179,10 +178,8 @@ async fn ignores_unsolicited_responses() { .await .unwrap(); - match filter.read_from_stream(&mut stream).await.unwrap() { - Message::Pong(returned_nonce) => assert_eq!(nonce, returned_nonce), - msg => panic!("Expected pong: {:?}", msg), - } + let pong = filter.read_from_stream(&mut stream).await.unwrap(); + assert_matches!(pong, Message::Pong(..)); } node.stop().await;