Skip to content

Commit

Permalink
Fixes 1
Browse files Browse the repository at this point in the history
  • Loading branch information
Rigidity committed Oct 28, 2024
1 parent c273883 commit 9838b4a
Show file tree
Hide file tree
Showing 3 changed files with 193 additions and 214 deletions.
8 changes: 2 additions & 6 deletions src/chia_dialect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,12 @@ impl Dialect for ChiaDialect {
o: NodePtr,
argument_list: NodePtr,
max_cost: Cost,
_extension: OperatorSet,
extension: OperatorSet,
) -> Response {
let flags = self.flags
| match extension {
OperatorSet::Default => 0,
OperatorSet::BLS => ENABLE_BLS_OPS_OUTSIDE_GUARD,
OperatorSet::Keccak => {
ENABLE_KECCAK_OPS_OUTSIDE_GUARD | ENABLE_BLS_OPS_OUTSIDE_GUARD
}
OperatorSet::Keccak => ENABLE_KECCAK_OPS_OUTSIDE_GUARD,
};

let op_len = allocator.atom_len(o);
Expand Down Expand Up @@ -188,7 +185,6 @@ impl Dialect for ChiaDialect {
match ext {
// The BLS extensions (and coinid) operators were brought into the
// main operator set as part of the hard fork
0 => OperatorSet::BLS,
1 if (self.flags & ENABLE_KECCAK) != 0 => OperatorSet::Keccak,
// new extensions go here
_ => OperatorSet::Default,
Expand Down
3 changes: 1 addition & 2 deletions src/dialect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ use crate::reduction::Response;
#[derive(Clone, Copy, Eq, PartialEq)]
pub enum OperatorSet {
Default,
BLS, // BLS and coinid operators
Keccak, // keccak256 operator (as well as BLS)
Keccak, // keccak256 operator
}

pub trait Dialect {
Expand Down
Loading

0 comments on commit 9838b4a

Please sign in to comment.