Support Debug Bank (#13017) (#13019)

(cherry picked from commit c0675968b1)

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
This commit is contained in:
mergify[bot]
2020-10-20 17:20:40 +00:00
committed by GitHub
parent f33171b32f
commit 94cad9873c
6 changed files with 81 additions and 14 deletions

View File

@@ -30,7 +30,7 @@ use solana_sdk::{
program_utils::limited_deserialize,
pubkey::Pubkey,
};
use std::{cell::RefCell, rc::Rc, sync::Arc};
use std::{cell::RefCell, fmt::Debug, rc::Rc, sync::Arc};
use thiserror::Error;
solana_sdk::declare_builtin!(
@@ -214,6 +214,14 @@ impl InstructionMeter for ThisInstructionMeter {
pub struct BPFExecutor {
executable: Box<dyn Executable<BPFError>>,
}
// Well, implement Debug for solana_rbpf::vm::Executable in solana-rbpf...
impl Debug for BPFExecutor {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
write!(f, "BPFExecutor({:p})", self)
}
}
impl Executor for BPFExecutor {
fn execute(
&self,