Skip to content

Commit

Permalink
Merge up
Browse files Browse the repository at this point in the history
  • Loading branch information
prozacchiwawa committed Sep 16, 2024
2 parents 7d28bbd + 4a070f2 commit df4502b
Show file tree
Hide file tree
Showing 31 changed files with 412 additions and 574 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-arm64-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
/opt/python/cp38-cp38/bin/python -m venv venv
if [ ! -f "activate" ]; then ln -s venv/bin/activate; fi
. ./activate
pip install maturin==1.1.0
pip install maturin==1.7.0
CC=gcc maturin build --release --strip --manylinux 2_28
- name: Upload artifacts
uses: actions/upload-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-m1-wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
python3 -m venv venv
. ./venv/bin/activate
export PATH=~/.cargo/bin:$PATH
pip install maturin==1.1.0
pip install maturin==1.7.0
maturin build -i python --release --strip
cargo test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install maturin==1.1.0
python -m pip install maturin==1.7.0
- name: Build MacOs with maturin on Python ${{ matrix.python }}
if: startsWith(matrix.os, 'macos')
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ resources/tests/game-referee/*.sym
resources/tests/game-referee/*.clvm.hex
__pycache__
.pytest_cache
main.sym
venv/
146 changes: 49 additions & 97 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ do-notation = "0.1.3"
serde_json = "1.0"
sha2 = "0.9.5"
tempfile = "3.3.0"
clvmr = { version = "=0.3.3", features = ["pre-eval"] }
clvmr = { version = "0.8.0", features = ["pre-eval"] }
binascii = "0.1.4"
yaml-rust = "0.4"
linked-hash-map = "0.5.6"
Expand Down
10 changes: 3 additions & 7 deletions src/classic/clvm/casts.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use clvm_rs::NodePtr;
use num_bigint::ToBigInt;

use clvm_rs::allocator::Allocator;
use clvm_rs::reduction::EvalErr;

use crate::classic::clvm::__type_compatibility__::{
Expand All @@ -12,16 +12,12 @@ pub struct TConvertOption {
pub signed: bool,
}

pub fn int_from_bytes(
allocator: &Allocator,
b: Bytes,
option: Option<TConvertOption>,
) -> Result<u64, EvalErr> {
pub fn int_from_bytes(b: Bytes, option: Option<TConvertOption>) -> Result<u64, EvalErr> {
if b.length() == 0 {
return Ok(0);
} else if b.length() * 8 > 64 {
return Err(EvalErr(
allocator.null(),
NodePtr::NIL,
"Cannot convert Bytes to Integer larger than 64bit. Use bigint_from_bytes instead."
.to_string(),
));
Expand Down
Loading

0 comments on commit df4502b

Please sign in to comment.