Bläddra i källkod

Update SDK to 1.9.2, fix warnings (#2674)

* Update SDK to 1.9.2, fix warnings

* Upgrade honggfuzz

* Use `get_latest_blockhash` correctly
Jon Cinque 3 år sedan
förälder
incheckning
96d2f61146
2 ändrade filer med 8 tillägg och 8 borttagningar
  1. 3 3
      program/Cargo.toml
  2. 5 5
      program/tests/assert_instruction_count.rs

+ 3 - 3
program/Cargo.toml

@@ -17,12 +17,12 @@ arrayref = "0.3.6"
 num-derive = "0.3"
 num-traits = "0.2"
 num_enum = "0.5.4"
-solana-program = "1.8.1"
+solana-program = "1.9.2"
 thiserror = "1.0"
 
 [dev-dependencies]
-solana-program-test = "1.8.1"
-solana-sdk = "1.8.1"
+solana-program-test = "1.9.2"
+solana-sdk = "1.9.2"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 5 - 5
program/tests/assert_instruction_count.rs

@@ -22,7 +22,7 @@ const TRANSFER_AMOUNT: u64 = 1_000_000_000_000_000;
 #[tokio::test]
 async fn initialize_mint() {
     let mut pt = ProgramTest::new("spl_token", id(), processor!(Processor::process));
-    pt.set_bpf_compute_max_units(5_000); // last known 2252
+    pt.set_compute_max_units(5_000); // last known 2252
     let (mut banks_client, payer, recent_blockhash) = pt.start().await;
 
     let owner_key = Pubkey::new_unique();
@@ -60,7 +60,7 @@ async fn initialize_mint() {
 #[tokio::test]
 async fn initialize_account() {
     let mut pt = ProgramTest::new("spl_token", id(), processor!(Processor::process));
-    pt.set_bpf_compute_max_units(6_000); // last known 3284
+    pt.set_compute_max_units(6_000); // last known 3284
     let (mut banks_client, payer, recent_blockhash) = pt.start().await;
 
     let owner = Keypair::new();
@@ -112,7 +112,7 @@ async fn initialize_account() {
 #[tokio::test]
 async fn mint_to() {
     let mut pt = ProgramTest::new("spl_token", id(), processor!(Processor::process));
-    pt.set_bpf_compute_max_units(6_000); // last known 2668
+    pt.set_compute_max_units(6_000); // last known 2668
     let (mut banks_client, payer, recent_blockhash) = pt.start().await;
 
     let owner = Keypair::new();
@@ -161,7 +161,7 @@ async fn mint_to() {
 #[tokio::test]
 async fn transfer() {
     let mut pt = ProgramTest::new("spl_token", id(), processor!(Processor::process));
-    pt.set_bpf_compute_max_units(7_000); // last known 2972
+    pt.set_compute_max_units(7_000); // last known 2972
     let (mut banks_client, payer, recent_blockhash) = pt.start().await;
 
     let owner = Keypair::new();
@@ -229,7 +229,7 @@ async fn transfer() {
 #[tokio::test]
 async fn burn() {
     let mut pt = ProgramTest::new("spl_token", id(), processor!(Processor::process));
-    pt.set_bpf_compute_max_units(6_000); // last known 2655
+    pt.set_compute_max_units(6_000); // last known 2655
     let (mut banks_client, payer, recent_blockhash) = pt.start().await;
 
     let owner = Keypair::new();