Skip to content

Commit

Permalink
Fix zero-copy test
Browse files Browse the repository at this point in the history
  • Loading branch information
Aursen committed Jun 4, 2023
1 parent 2420fbf commit 25a708e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
9 changes: 3 additions & 6 deletions client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,9 @@ impl<C: Deref<Target = impl Signer> + Clone> Program<C> {
let (mut notifications, unsubscribe) = client.logs_subscribe(filter, config).await?;

tx.send(unsubscribe).map_err(|e| {
ClientError::SolanaClientPubsubError(
solana_client::nonblocking::pubsub_client::PubsubClientError::SubscribeFailed {
message: e.to_string(),
reason: e.to_string(),
},
)
ClientError::SolanaClientPubsubError(PubsubClientError::UnexpectedMessageError(
e.to_string(),
))
})?;

while let Some(logs) = notifications.next().await {
Expand Down
2 changes: 1 addition & 1 deletion tests/zero-copy/programs/zero-copy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ anchor-lang = { path = "../../../../lang" }
bytemuck = {version = "1.4.0", features = ["derive", "min_const_generics"]}

[dev-dependencies]
anchor-client = { path = "../../../../client", features = ["debug"] }
anchor-client = { path = "../../../../client", features = ["debug", "async"] }
solana-program-test = "<1.17.0"
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ async fn update_foo() {
Rc::new(Keypair::new()),
CommitmentConfig::processed(),
);
let program = client.program(zero_copy::id());
let program = client.program(zero_copy::id())?;
let update_ix = program
.request()
.accounts(zero_copy::accounts::UpdateFoo {
Expand Down

0 comments on commit 25a708e

Please sign in to comment.