From ed1c912458947ff053c3d87b06c098ce2d8a7371 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Mei=C3=9Fner?= Date: Mon, 21 Aug 2023 16:56:26 +0200 Subject: [PATCH] Removes TautologyVerifier from public interface. --- src/verifier.rs | 14 -------------- tests/verifier.rs | 14 +++++++++++++- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/src/verifier.rs b/src/verifier.rs index b32119778..d42ee63f4 100644 --- a/src/verifier.rs +++ b/src/verifier.rs @@ -382,17 +382,3 @@ impl Verifier for RequisiteVerifier { Ok(()) } } - -/// Passes all inputs. Used to mark executables as unverified. -#[derive(Debug)] -pub struct TautologyVerifier {} -impl Verifier for TautologyVerifier { - fn verify( - _prog: &[u8], - _config: &Config, - _sbpf_version: &SBPFVersion, - _function_registry: &FunctionRegistry, - ) -> std::result::Result<(), VerifierError> { - Ok(()) - } -} diff --git a/tests/verifier.rs b/tests/verifier.rs index 57a5679b3..07df83014 100644 --- a/tests/verifier.rs +++ b/tests/verifier.rs @@ -26,7 +26,7 @@ use solana_rbpf::{ assembler::assemble, ebpf, elf::{Executable, FunctionRegistry, SBPFVersion}, - verifier::{RequisiteVerifier, TautologyVerifier, Verifier, VerifierError}, + verifier::{RequisiteVerifier, Verifier, VerifierError}, vm::{BuiltinProgram, Config, TestContextObject}, }; use std::sync::Arc; @@ -40,6 +40,18 @@ pub enum VerifierTestError { Rejected(String), } +struct TautologyVerifier {} +impl Verifier for TautologyVerifier { + fn verify( + _prog: &[u8], + _config: &Config, + _sbpf_version: &SBPFVersion, + _function_registry: &FunctionRegistry, + ) -> std::result::Result<(), VerifierError> { + Ok(()) + } +} + struct ContradictionVerifier {} impl Verifier for ContradictionVerifier { fn verify(