From ca4fe7d953215c6c5356d7f8669ce99246bbfa1a 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 b3211977..d42ee63f 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 57a5679b..07df8301 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(