Store versioned transactions in the ledger, disabled by default (#19139)
* Add support for versioned transactions, but disable by default * merge conflicts * trent's feedback * bump Cargo.lock * Fix transaction error encoding * Rename legacy_transaction method * cargo clippy * Clean up casts, int arithmetic, and unused methods * Check for duplicates in sanitized message conversion * fix clippy * fix new test * Fix bpf conditional compilation for message module
This commit is contained in:
@@ -2,7 +2,7 @@ use std::{cell::RefCell, rc::Rc};
|
||||
|
||||
use solana_sdk::{
|
||||
instruction::{CompiledInstruction, Instruction},
|
||||
message::Message,
|
||||
message::SanitizedMessage,
|
||||
};
|
||||
|
||||
/// Records and compiles cross-program invoked instructions
|
||||
@@ -12,11 +12,14 @@ pub struct InstructionRecorder {
|
||||
}
|
||||
|
||||
impl InstructionRecorder {
|
||||
pub fn compile_instructions(&self, message: &Message) -> Vec<CompiledInstruction> {
|
||||
pub fn compile_instructions(
|
||||
&self,
|
||||
message: &SanitizedMessage,
|
||||
) -> Option<Vec<CompiledInstruction>> {
|
||||
self.inner
|
||||
.borrow()
|
||||
.iter()
|
||||
.map(|ix| message.compile_instruction(ix))
|
||||
.map(|ix| message.try_compile_instruction(ix))
|
||||
.collect()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user