Browse Source

ci: Bump repo to Solana 1.17 (#5575)

* Update workspace for new cargo resolver, remove ntapi patch

* Update Rust versions

* Update dependencies with `./update-solana-dependencies.sh 1.17.2`

* Update lockfile

* Fix build errors

* Run clippy with `--fix`

* concurrent-merkle-tree: Fix function to not use mutable ref

* Replace StakeState with StakeStateV2

* governance: Fix clippy lint

* governance: Fix unnecessary mut

* Allow `clippy::items_after_module`

* token: Make error tests clearer

* token-2022: Fix private glob re-export

* token-upgrade-cli: Replace validator with parser

* single-pool-cli: Fix parsers

* ci: Update clippy command

* Update anchor version

* token-metadata: Use `no-entrypoint` feature in token-2022

* ci: Add protobuf-compiler to build deps

* discriminator-syn: *Don't* specify type of lib to build

* ci: Blast directories in cargo-build-test

* account-compression: Update build and lockfile

* Update token-group and feature-gate

* single-pool: revert WrongStakeStateV2

* stake-pool: revert WrongStakeStateV2

* stake-pool-py: revert StakeStateV2

---------

Co-authored-by: hanako mumei <81144685+2501babe@users.noreply.github.com>
Jon Cinque 2 years ago
parent
commit
cde93206cc
3 changed files with 9 additions and 7 deletions
  1. 3 3
      program/Cargo.toml
  2. 1 1
      program/src/lib.rs
  3. 5 3
      program/src/processor.rs

+ 3 - 3
program/Cargo.toml

@@ -18,15 +18,15 @@ bytemuck = "1.14.0"
 num-derive = "0.4"
 num-traits = "0.2"
 num_enum = "0.7.0"
-solana-program = "1.16.16"
+solana-program = "1.17.2"
 thiserror = "1.0"
 
 [dev-dependencies]
 lazy_static = "1.4.0"
 proptest = "1.3"
 serial_test = "2.0.0"
-solana-program-test = "1.16.16"
-solana-sdk = "1.16.16"
+solana-program-test = "1.17.2"
+solana-sdk = "1.17.2"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 1 - 1
program/src/lib.rs

@@ -1,4 +1,4 @@
-#![allow(clippy::integer_arithmetic)]
+#![allow(clippy::arithmetic_side_effects)]
 #![deny(missing_docs)]
 #![cfg_attr(not(test), forbid(unsafe_code))]
 

+ 5 - 3
program/src/processor.rs

@@ -1147,9 +1147,11 @@ mod tests {
     }
 
     #[test]
-    #[should_panic(expected = "Custom(3)")]
-    fn test_error_unwrap() {
-        Err::<(), ProgramError>(return_token_error_as_program_error()).unwrap();
+    fn test_error_as_custom() {
+        assert_eq!(
+            return_token_error_as_program_error(),
+            ProgramError::Custom(3)
+        );
     }
 
     #[test]