Skip to content

Commit 476c9e7

Browse files
committed
chore: update dependencies, fix lints
1 parent 4fbc55a commit 476c9e7

File tree

6 files changed

+69
-68
lines changed

6 files changed

+69
-68
lines changed

Cargo.lock

Lines changed: 48 additions & 39 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ required-features = ["stl"]
2525
amplify = { version = "~4.7.0", features = ["rand"] }
2626
baid64 = "~0.2.2"
2727
strict_encoding = "~2.7.0"
28-
strict_types = { version = "~2.7.0", features = ["armor"] }
28+
strict_types = { version = "~2.7.2", features = ["armor"] }
2929
aluvm = { version = "~0.11.0-beta.9", features = ["std", "ascii-armor"] }
3030
commit_verify = { version = "~0.11.0-beta.9", features = ["rand", "derive"] }
3131
single_use_seals = "~0.11.0-beta.9"
@@ -60,12 +60,3 @@ wasm-bindgen-test = "0.3"
6060

6161
[package.metadata.docs.rs]
6262
features = ["all"]
63-
64-
[patch.crates-io]
65-
commit_verify = { git = "https://github.com/LNP-BP/client_side_validation", branch = "develop" }
66-
single_use_seals = { git = "https://github.com/LNP-BP/client_side_validation", branch = "develop" }
67-
aluvm = { git = "https://github.com/AluVM/rust-aluvm", branch = "develop" }
68-
bp-consensus = { git = "https://github.com/BP-WG/bp-core", branch = "develop" }
69-
bp-dbc = { git = "https://github.com/BP-WG/bp-core", branch = "develop" }
70-
bp-seals = { git = "https://github.com/BP-WG/bp-core", branch = "develop" }
71-
bp-core = { git = "https://github.com/BP-WG/bp-core", branch = "develop" }

src/operation/xchain.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,7 @@ pub const XCHAIN_LIQUID_PREFIX: &str = "lq";
4242

4343
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Display)]
4444
#[display(lowercase)]
45-
#[derive(
46-
strict_encoding::StrictType,
47-
StrictDumb,
48-
strict_encoding::StrictEncode,
49-
strict_encoding::StrictDecode
50-
)]
45+
#[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)]
5146
#[strict_type(lib = LIB_NAME_RGB_COMMIT, tags = repr, into_u8, try_from_u8)]
5247
#[cfg_attr(
5348
feature = "serde",

src/validation/consignment.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,8 @@
2424
//! state transitions, extensions, genesis, outputs, assignments &
2525
//! single-use-seal data.
2626
27-
use std::collections::BTreeMap;
28-
2927
use aluvm::library::{Lib, LibId};
30-
use amplify::confinement::Confined;
28+
use amplify::confinement::ConfinedOrdMap;
3129
use strict_types::TypeSystem;
3230

3331
use super::EAnchor;
@@ -40,7 +38,7 @@ use crate::{
4038

4139
pub const CONSIGNMENT_MAX_LIBS: usize = 1024;
4240

43-
pub type Scripts = Confined<BTreeMap<LibId, Lib>, 0, CONSIGNMENT_MAX_LIBS>;
41+
pub type Scripts = ConfinedOrdMap<LibId, Lib, 0, CONSIGNMENT_MAX_LIBS>;
4442

4543
#[derive(Copy, Clone, PartialEq, Eq, Debug, From)]
4644
pub enum OpRef<'op> {

src/vm/op_contract.rs

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,11 @@ impl<S: ContractStateAccess> InstructionSet for ContractOp<S> {
340340
fail!()
341341
};
342342
let state = state.map(|s| s.value.as_inner());
343-
regs.set_s(*reg, state);
343+
if let Some(state) = state {
344+
regs.set_s16(*reg, state);
345+
} else {
346+
regs.clr_s16(*reg);
347+
}
344348
}
345349
ContractOp::LdS(state_type, reg_32, reg) => {
346350
let Some(reg_32) = *regs.get_n(RegA::A16, *reg_32) else {
@@ -357,7 +361,11 @@ impl<S: ContractStateAccess> InstructionSet for ContractOp<S> {
357361
fail!()
358362
};
359363
let state = state.map(|s| s.value.into_inner());
360-
regs.set_s(*reg, state);
364+
if let Some(state) = state {
365+
regs.set_s16(*reg, state);
366+
} else {
367+
regs.clr_s16(*reg);
368+
}
361369
}
362370
ContractOp::LdF(state_type, reg_32, reg) => {
363371
let Some(reg_32) = *regs.get_n(RegA::A16, *reg_32) else {
@@ -389,7 +397,7 @@ impl<S: ContractStateAccess> InstructionSet for ContractOp<S> {
389397
else {
390398
fail!()
391399
};
392-
regs.set_s(*reg_s, Some(state.as_inner()));
400+
regs.set_s16(*reg_s, state.as_inner());
393401
}
394402

395403
ContractOp::LdC(state_type, reg_32, reg_s) => {
@@ -407,13 +415,13 @@ impl<S: ContractStateAccess> InstructionSet for ContractOp<S> {
407415
let Some(state) = global.nth(index) else {
408416
fail!()
409417
};
410-
regs.set_s(*reg_s, Some(state.borrow().as_inner()));
418+
regs.set_s16(*reg_s, state.borrow().as_inner());
411419
}
412420
ContractOp::LdM(type_id, reg) => {
413421
let Some(meta) = context.op_info.metadata.get(type_id) else {
414422
fail!()
415423
};
416-
regs.set_s(*reg, Some(meta.to_inner()));
424+
regs.set_s16(*reg, meta.to_inner());
417425
}
418426

419427
ContractOp::Pcvs(state_type) => {

0 commit comments

Comments
 (0)