Skip to content

Commit

Permalink
Add program to process if it doesn't exist yet
Browse files Browse the repository at this point in the history
  • Loading branch information
raychu86 committed Jul 21, 2023
1 parent 8b9f163 commit 52e2f4a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cli/src/commands/developer/execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ impl Execute {
let store = ConsensusStore::<CurrentNetwork, ConsensusMemory<CurrentNetwork>>::open(None)?;
let vm = VM::from(store)?;

// Add the program to the process if it does not already exist.
if !vm.contains_program(program.id()) {
vm.process().write().add_program(&program)?;
}

// Prepare the fees.
let fee = match self.record {
Some(record_string) => {
Expand Down

0 comments on commit 52e2f4a

Please sign in to comment.