Support Debug Bank (#13017)

This commit is contained in:
Ryo Onodera
2020-10-21 01:05:45 +09:00
committed by GitHub
parent 6c55aaf4c7
commit c0675968b1
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,