Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.

Commit 44ae650

Browse files
authored
Merge pull request #2 from TheWaWaR/support-ckb2021
chore: support ckb2021
2 parents 3971ba1 + bdd9ce2 commit 44ae650

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "ckb-x64-simulator"
33
description = "A simulator that allows running CKB smart contracts on x64 environment for tooling benefits"
4-
version = "0.4.0"
4+
version = "0.5.0"
55
license = "MIT"
66
authors = ["Nervos Core Dev <[email protected]>"]
77
edition = "2018"
@@ -13,9 +13,9 @@ crate-type = ["lib", "staticlib", "cdylib"]
1313
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1414

1515
[dependencies]
16-
ckb-standalone-debugger = "0.3.0"
17-
ckb-types = "0.37.0"
18-
faster-hex = "0.4.1"
16+
ckb-standalone-debugger = "0.20.0-rc3"
17+
ckb-types = "0.100.0-rc2"
18+
faster-hex = "0.6"
1919
lazy_static = "1.4"
2020
serde = "1.0"
2121
serde_derive = "1.0"

src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ pub extern "C" fn ckb_dlopen2(
309309
let mut buffer = vec![];
310310
buffer.extend_from_slice(dep_cell_hash);
311311
buffer.push(hash_type);
312-
let key = format!("0x{}", faster_hex::hex_string(&buffer).expect("faster hex"));
312+
let key = format!("0x{}", faster_hex::hex_string(&buffer));
313313
let filename = SETUP
314314
.native_binaries
315315
.get(&key)
@@ -596,5 +596,6 @@ fn store_data(ptr: *mut c_void, len: *mut u64, offset: u64, data: &[u8]) {
596596
let full_size = data_len - offset;
597597
let real_size = std::cmp::min(size, full_size);
598598
*size_ptr = full_size;
599-
buffer[..real_size as usize].copy_from_slice(&data[offset as usize..(offset + real_size) as usize]);
599+
buffer[..real_size as usize]
600+
.copy_from_slice(&data[offset as usize..(offset + real_size) as usize]);
600601
}

0 commit comments

Comments
 (0)