From 9add6ce131787ae3a4e05df8afde523aae695600 Mon Sep 17 00:00:00 2001 From: Kevin Heavey Date: Sun, 20 Oct 2024 13:52:46 +0400 Subject: [PATCH] don't ignore doc examples in secp256k1-recover (#3229) --- Cargo.lock | 1 + curves/secp256k1-recover/Cargo.toml | 1 + curves/secp256k1-recover/src/lib.rs | 6 +++--- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0f3a6d62d39b69..ac4a047518b824 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7963,6 +7963,7 @@ dependencies = [ "solana-define-syscall", "solana-frozen-abi", "solana-frozen-abi-macro", + "solana-program", "thiserror", ] diff --git a/curves/secp256k1-recover/Cargo.toml b/curves/secp256k1-recover/Cargo.toml index daa138f76e18e6..a32779dadd52af 100644 --- a/curves/secp256k1-recover/Cargo.toml +++ b/curves/secp256k1-recover/Cargo.toml @@ -28,6 +28,7 @@ libsecp256k1 = { workspace = true } [dev-dependencies] anyhow = { workspace = true } borsh = { workspace = true } +solana-program = { path = "../../sdk/program" } [target.'cfg(not(target_os = "solana"))'.dev-dependencies] libsecp256k1 = { workspace = true, features = ["hmac"] } diff --git a/curves/secp256k1-recover/src/lib.rs b/curves/secp256k1-recover/src/lib.rs index 55c764b214a1e3..2926a869d05844 100644 --- a/curves/secp256k1-recover/src/lib.rs +++ b/curves/secp256k1-recover/src/lib.rs @@ -165,7 +165,7 @@ solana_define_syscall::define_syscall!(fn sol_secp256k1_recover(hash: *const u8, /// signatures with high-order `S` values. The following code will accomplish /// this: /// -/// ```rust,ignore +/// ```rust /// # use solana_program::program_error::ProgramError; /// # let signature_bytes = [ /// # 0x83, 0x55, 0x81, 0xDF, 0xB1, 0x02, 0xA7, 0xD2, @@ -261,7 +261,7 @@ solana_define_syscall::define_syscall!(fn sol_secp256k1_recover(hash: *const u8, /// The Solana program. Note that it uses `libsecp256k1` version 0.7.0 to parse /// the secp256k1 signature to prevent malleability. /// -/// ```rust,ignore +/// ```rust,no_run /// use solana_program::{ /// entrypoint::ProgramResult, /// keccak, msg, @@ -331,7 +331,7 @@ solana_define_syscall::define_syscall!(fn sol_secp256k1_recover(hash: *const u8, /// /// The RPC client program: /// -/// ```rust,ignore +/// ```rust,no_run /// # use solana_program::example_mocks::solana_rpc_client; /// # use solana_program::example_mocks::solana_sdk; /// use anyhow::Result;