Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/executive/vm/opcodes/opcodes/altstack/op_fromaltstack.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
use crate::executive::{
stack::{stack_error::StackError, stack_holder::StackHolder},
};
use crate::executive::stack::{stack_error::StackError, stack_holder::StackHolder};
use crate::inscriptive::params_manager::params_holder::opcode_ops_params::OpcodeOpsParams;
use serde::{Deserialize, Serialize};

Expand All @@ -20,7 +18,9 @@ impl OP_FROMALTSTACK {
let last_item = stack_holder.alt_stack_pop()?;

// Increment the ops counter.
stack_holder.increment_ops(OpcodeOpsParams::as_u32(stack_holder.opcode_ops().op_fromaltstack))?;
stack_holder.increment_ops(OpcodeOpsParams::as_u32(
stack_holder.opcode_ops().op_fromaltstack,
))?;

// Push the last item to the main stack.
stack_holder.push(last_item)?;
Expand Down
8 changes: 4 additions & 4 deletions src/executive/vm/opcodes/opcodes/altstack/op_toaltstack.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
use crate::executive::{
stack::{stack_error::StackError, stack_holder::StackHolder},
};
use crate::executive::stack::{stack_error::StackError, stack_holder::StackHolder};
use crate::inscriptive::params_manager::params_holder::opcode_ops_params::OpcodeOpsParams;
use serde::{Deserialize, Serialize};

Expand All @@ -20,7 +18,9 @@ impl OP_TOALTSTACK {
let last_item = stack_holder.pop()?;

// Increment the ops counter.
stack_holder.increment_ops(OpcodeOpsParams::as_u32(stack_holder.opcode_ops().op_toaltstack))?;
stack_holder.increment_ops(OpcodeOpsParams::as_u32(
stack_holder.opcode_ops().op_toaltstack,
))?;

// Push the last item to the alt stack.
stack_holder.alt_stack_push(last_item)?;
Expand Down
8 changes: 5 additions & 3 deletions src/executive/vm/opcodes/opcodes/arithmetic/op_0notequal.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::executive::{
stack::{stack_error::StackError, stack_holder::StackHolder, stack_item::StackItem},
use crate::executive::stack::{
stack_error::StackError, stack_holder::StackHolder, stack_item::StackItem,
};
use crate::inscriptive::params_manager::params_holder::opcode_ops_params::OpcodeOpsParams;
use serde::{Deserialize, Serialize};
Expand All @@ -26,7 +26,9 @@ impl OP_0NOTEQUAL {
}

// Increment the ops counter.
stack_holder.increment_ops(OpcodeOpsParams::as_u32(stack_holder.opcode_ops().op_0notequal))?;
stack_holder.increment_ops(OpcodeOpsParams::as_u32(
stack_holder.opcode_ops().op_0notequal,
))?;

Ok(())
}
Expand Down
12 changes: 5 additions & 7 deletions src/executive/vm/opcodes/opcodes/arithmetic/op_1add.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
use crate::executive::{
stack::{
stack_error::{StackError, StackUintError},
stack_holder::StackHolder,
stack_item::StackItem,
stack_uint::{SafeConverter, StackItemUintExt, StackUint},
},
use crate::executive::stack::{
stack_error::{StackError, StackUintError},
stack_holder::StackHolder,
stack_item::StackItem,
stack_uint::{SafeConverter, StackItemUintExt, StackUint},
};
use crate::inscriptive::params_manager::params_holder::opcode_ops_params::OpcodeOpsParams;
use serde::{Deserialize, Serialize};
Expand Down
12 changes: 5 additions & 7 deletions src/executive/vm/opcodes/opcodes/arithmetic/op_1sub.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
use crate::executive::{
stack::{
stack_error::{StackError, StackUintError},
stack_holder::StackHolder,
stack_item::StackItem,
stack_uint::{SafeConverter, StackItemUintExt, StackUint},
},
use crate::executive::stack::{
stack_error::{StackError, StackUintError},
stack_holder::StackHolder,
stack_item::StackItem,
stack_uint::{SafeConverter, StackItemUintExt, StackUint},
};
use crate::inscriptive::params_manager::params_holder::opcode_ops_params::OpcodeOpsParams;
use serde::{Deserialize, Serialize};
Expand Down
12 changes: 5 additions & 7 deletions src/executive/vm/opcodes/opcodes/arithmetic/op_2div.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
use crate::executive::{
stack::{
stack_error::{StackError, StackUintError},
stack_holder::StackHolder,
stack_item::StackItem,
stack_uint::{SafeConverter, StackItemUintExt, StackUint},
},
use crate::executive::stack::{
stack_error::{StackError, StackUintError},
stack_holder::StackHolder,
stack_item::StackItem,
stack_uint::{SafeConverter, StackItemUintExt, StackUint},
};
use crate::inscriptive::params_manager::params_holder::opcode_ops_params::OpcodeOpsParams;
use serde::{Deserialize, Serialize};
Expand Down
12 changes: 5 additions & 7 deletions src/executive/vm/opcodes/opcodes/arithmetic/op_2mul.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
use crate::executive::{
stack::{
stack_error::{StackError, StackUintError},
stack_holder::StackHolder,
stack_item::StackItem,
stack_uint::{SafeConverter, StackItemUintExt, StackUint},
},
use crate::executive::stack::{
stack_error::{StackError, StackUintError},
stack_holder::StackHolder,
stack_item::StackItem,
stack_uint::{SafeConverter, StackItemUintExt, StackUint},
};
use crate::inscriptive::params_manager::params_holder::opcode_ops_params::OpcodeOpsParams;
use serde::{Deserialize, Serialize};
Expand Down
12 changes: 5 additions & 7 deletions src/executive/vm/opcodes/opcodes/arithmetic/op_add.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
use crate::executive::{
stack::{
stack_error::{StackError, StackUintError},
stack_holder::StackHolder,
stack_item::StackItem,
stack_uint::StackItemUintExt,
},
use crate::executive::stack::{
stack_error::{StackError, StackUintError},
stack_holder::StackHolder,
stack_item::StackItem,
stack_uint::StackItemUintExt,
};
use crate::inscriptive::params_manager::params_holder::opcode_ops_params::OpcodeOpsParams;
use serde::{Deserialize, Serialize};
Expand Down
12 changes: 5 additions & 7 deletions src/executive/vm/opcodes/opcodes/arithmetic/op_addmod.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
use crate::executive::{
stack::{
stack_error::{StackError, StackUintError},
stack_holder::StackHolder,
stack_item::StackItem,
stack_uint::{StackItemUintExt, StackUint},
},
use crate::executive::stack::{
stack_error::{StackError, StackUintError},
stack_holder::StackHolder,
stack_item::StackItem,
stack_uint::{StackItemUintExt, StackUint},
};
use crate::inscriptive::params_manager::params_holder::opcode_ops_params::OpcodeOpsParams;
use serde::{Deserialize, Serialize};
Expand Down
8 changes: 5 additions & 3 deletions src/executive/vm/opcodes/opcodes/arithmetic/op_booland.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::executive::{
stack::{stack_error::StackError, stack_holder::StackHolder, stack_item::StackItem},
use crate::executive::stack::{
stack_error::StackError, stack_holder::StackHolder, stack_item::StackItem,
};
use crate::inscriptive::params_manager::params_holder::opcode_ops_params::OpcodeOpsParams;
use serde::{Deserialize, Serialize};
Expand Down Expand Up @@ -30,7 +30,9 @@ impl OP_BOOLAND {
}

// Increment the ops counter.
stack_holder.increment_ops(OpcodeOpsParams::as_u32(stack_holder.opcode_ops().op_booland))?;
stack_holder.increment_ops(OpcodeOpsParams::as_u32(
stack_holder.opcode_ops().op_booland,
))?;

Ok(())
}
Expand Down
4 changes: 2 additions & 2 deletions src/executive/vm/opcodes/opcodes/arithmetic/op_boolor.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::executive::{
stack::{stack_error::StackError, stack_holder::StackHolder, stack_item::StackItem},
use crate::executive::stack::{
stack_error::StackError, stack_holder::StackHolder, stack_item::StackItem,
};
use crate::inscriptive::params_manager::params_holder::opcode_ops_params::OpcodeOpsParams;
use serde::{Deserialize, Serialize};
Expand Down
12 changes: 5 additions & 7 deletions src/executive/vm/opcodes/opcodes/arithmetic/op_div.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
use crate::executive::{
stack::{
stack_error::{StackError, StackUintError},
stack_holder::StackHolder,
stack_item::StackItem,
stack_uint::{StackItemUintExt, StackUint},
},
use crate::executive::stack::{
stack_error::{StackError, StackUintError},
stack_holder::StackHolder,
stack_item::StackItem,
stack_uint::{StackItemUintExt, StackUint},
};
use crate::inscriptive::params_manager::params_holder::opcode_ops_params::OpcodeOpsParams;
use serde::{Deserialize, Serialize};
Expand Down
16 changes: 8 additions & 8 deletions src/executive/vm/opcodes/opcodes/arithmetic/op_greaterthan.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
use crate::executive::{
stack::{
stack_error::{StackError, StackUintError},
stack_holder::StackHolder,
stack_item::StackItem,
stack_uint::StackItemUintExt,
},
use crate::executive::stack::{
stack_error::{StackError, StackUintError},
stack_holder::StackHolder,
stack_item::StackItem,
stack_uint::StackItemUintExt,
};
use crate::inscriptive::params_manager::params_holder::opcode_ops_params::OpcodeOpsParams;
use serde::{Deserialize, Serialize};
Expand Down Expand Up @@ -44,7 +42,9 @@ impl OP_GREATERTHAN {
}

// Increment the ops counter.
stack_holder.increment_ops(OpcodeOpsParams::as_u32(stack_holder.opcode_ops().op_greaterthan))?;
stack_holder.increment_ops(OpcodeOpsParams::as_u32(
stack_holder.opcode_ops().op_greaterthan,
))?;

Ok(())
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
use crate::executive::{
stack::{
stack_error::{StackError, StackUintError},
stack_holder::StackHolder,
stack_item::StackItem,
stack_uint::StackItemUintExt,
},
use crate::executive::stack::{
stack_error::{StackError, StackUintError},
stack_holder::StackHolder,
stack_item::StackItem,
stack_uint::StackItemUintExt,
};
use crate::inscriptive::params_manager::params_holder::opcode_ops_params::OpcodeOpsParams;
use serde::{Deserialize, Serialize};
Expand Down Expand Up @@ -44,7 +42,9 @@ impl OP_GREATERTHANOREQUAL {
}

// Increment the ops counter.
stack_holder.increment_ops(OpcodeOpsParams::as_u32(stack_holder.opcode_ops().op_greaterthanorequal))?;
stack_holder.increment_ops(OpcodeOpsParams::as_u32(
stack_holder.opcode_ops().op_greaterthanorequal,
))?;

Ok(())
}
Expand Down
16 changes: 8 additions & 8 deletions src/executive/vm/opcodes/opcodes/arithmetic/op_lessthan.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
use crate::executive::{
stack::{
stack_error::{StackError, StackUintError},
stack_holder::StackHolder,
stack_item::StackItem,
stack_uint::StackItemUintExt,
},
use crate::executive::stack::{
stack_error::{StackError, StackUintError},
stack_holder::StackHolder,
stack_item::StackItem,
stack_uint::StackItemUintExt,
};
use crate::inscriptive::params_manager::params_holder::opcode_ops_params::OpcodeOpsParams;
use serde::{Deserialize, Serialize};
Expand Down Expand Up @@ -44,7 +42,9 @@ impl OP_LESSTHAN {
}

// Increment the ops counter.
stack_holder.increment_ops(OpcodeOpsParams::as_u32(stack_holder.opcode_ops().op_lessthan))?;
stack_holder.increment_ops(OpcodeOpsParams::as_u32(
stack_holder.opcode_ops().op_lessthan,
))?;

Ok(())
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
use crate::executive::{
stack::{
stack_error::{StackError, StackUintError},
stack_holder::StackHolder,
stack_item::StackItem,
stack_uint::StackItemUintExt,
},
use crate::executive::stack::{
stack_error::{StackError, StackUintError},
stack_holder::StackHolder,
stack_item::StackItem,
stack_uint::StackItemUintExt,
};
use crate::inscriptive::params_manager::params_holder::opcode_ops_params::OpcodeOpsParams;
use serde::{Deserialize, Serialize};
Expand Down Expand Up @@ -44,7 +42,9 @@ impl OP_LESSTHANOREQUAL {
}

// Increment the ops counter.
stack_holder.increment_ops(OpcodeOpsParams::as_u32(stack_holder.opcode_ops().op_lessthanorequal))?;
stack_holder.increment_ops(OpcodeOpsParams::as_u32(
stack_holder.opcode_ops().op_lessthanorequal,
))?;

Ok(())
}
Expand Down
4 changes: 2 additions & 2 deletions src/executive/vm/opcodes/opcodes/arithmetic/op_lshift.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::executive::{
stack::{stack_error::StackError, stack_holder::StackHolder, stack_item::StackItem},
use crate::executive::stack::{
stack_error::StackError, stack_holder::StackHolder, stack_item::StackItem,
};
use crate::inscriptive::params_manager::params_holder::opcode_ops_params::OpcodeOpsParams;
use serde::{Deserialize, Serialize};
Expand Down
12 changes: 5 additions & 7 deletions src/executive/vm/opcodes/opcodes/arithmetic/op_max.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
use crate::executive::{
stack::{
stack_error::{StackError, StackUintError},
stack_holder::StackHolder,
stack_item::StackItem,
stack_uint::StackItemUintExt,
},
use crate::executive::stack::{
stack_error::{StackError, StackUintError},
stack_holder::StackHolder,
stack_item::StackItem,
stack_uint::StackItemUintExt,
};
use crate::inscriptive::params_manager::params_holder::opcode_ops_params::OpcodeOpsParams;
use serde::{Deserialize, Serialize};
Expand Down
12 changes: 5 additions & 7 deletions src/executive/vm/opcodes/opcodes/arithmetic/op_min.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
use crate::executive::{
stack::{
stack_error::{StackError, StackUintError},
stack_holder::StackHolder,
stack_item::StackItem,
stack_uint::StackItemUintExt,
},
use crate::executive::stack::{
stack_error::{StackError, StackUintError},
stack_holder::StackHolder,
stack_item::StackItem,
stack_uint::StackItemUintExt,
};
use crate::inscriptive::params_manager::params_holder::opcode_ops_params::OpcodeOpsParams;
use serde::{Deserialize, Serialize};
Expand Down
12 changes: 5 additions & 7 deletions src/executive/vm/opcodes/opcodes/arithmetic/op_mul.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
use crate::executive::{
stack::{
stack_error::{StackError, StackUintError},
stack_holder::StackHolder,
stack_item::StackItem,
stack_uint::StackItemUintExt,
},
use crate::executive::stack::{
stack_error::{StackError, StackUintError},
stack_holder::StackHolder,
stack_item::StackItem,
stack_uint::StackItemUintExt,
};
use crate::inscriptive::params_manager::params_holder::opcode_ops_params::OpcodeOpsParams;
use serde::{Deserialize, Serialize};
Expand Down
12 changes: 5 additions & 7 deletions src/executive/vm/opcodes/opcodes/arithmetic/op_mulmod.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
use crate::executive::{
stack::{
stack_error::{StackError, StackUintError},
stack_holder::StackHolder,
stack_item::StackItem,
stack_uint::{StackItemUintExt, StackUint},
},
use crate::executive::stack::{
stack_error::{StackError, StackUintError},
stack_holder::StackHolder,
stack_item::StackItem,
stack_uint::{StackItemUintExt, StackUint},
};
use crate::inscriptive::params_manager::params_holder::opcode_ops_params::OpcodeOpsParams;
use serde::{Deserialize, Serialize};
Expand Down
4 changes: 2 additions & 2 deletions src/executive/vm/opcodes/opcodes/arithmetic/op_not.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::executive::{
stack::{stack_error::StackError, stack_holder::StackHolder, stack_item::StackItem},
use crate::executive::stack::{
stack_error::StackError, stack_holder::StackHolder, stack_item::StackItem,
};
use crate::inscriptive::params_manager::params_holder::opcode_ops_params::OpcodeOpsParams;
use serde::{Deserialize, Serialize};
Expand Down
Loading
Loading