Skip to content

Commit b385e86

Browse files
committed
Merge remote-tracking branch 'origin/develop' into fix/bitcoin-reorg-extend
2 parents 8f2bd84 + 1e60445 commit b385e86

File tree

35 files changed

+436
-105
lines changed

35 files changed

+436
-105
lines changed

.cargo/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[alias]
22
stacks-node = "run --package stacks-node --"
33
fmt-stacks = "fmt -- --config group_imports=StdExternalCrate,imports_granularity=Module"
4-
clippy-stacks = "clippy -p stx-genesis -p libstackerdb -p stacks-signer -p pox-locking -p clarity -p libsigner -p stacks-common --no-deps --tests --all-features -- -D warnings"
4+
clippy-stacks = "clippy -p stx-genesis -p libstackerdb -p stacks-signer -p pox-locking -p clarity -p libsigner -p stacks-common --no-deps --tests --all-features -- -D warnings -A clippy::uninlined-format-args"
55

66
# Uncomment to improve performance slightly, at the cost of portability
77
# * Note that native binaries may not run on CPUs that are different from the build machine

.vscode/settings.json

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
{
2-
"lldb.launch.sourceLanguages": [
3-
"rust"
4-
],
5-
"rust-analyzer.runnables.extraEnv": {
6-
"BITCOIND_TEST": "1"
7-
},
8-
"rust-analyzer.rustfmt.extraArgs": [
9-
"+nightly"
10-
],
11-
"files.eol": "\n"
12-
}
2+
"lldb.launch.sourceLanguages": ["rust"],
3+
"rust-analyzer.runnables.extraEnv": {
4+
"BITCOIND_TEST": "1"
5+
},
6+
"rust-analyzer.rustfmt.extraArgs": ["+nightly"],
7+
"files.eol": "\n"
8+
}

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ and this project adheres to the versioning scheme outlined in the [README.md](RE
1414
- `stacks_node_miner_stop_reason_total`: Counts the number of times the miner stopped mining due to various reasons.
1515
- Always report the number of transactions mined in the last attempt, even if there were 0
1616

17+
- Added a new option `--hex-file <file_path>` to `blockstack-cli contract-call` command, that allows to pass a serialized Clarity value by file.
1718
- Added a new option `--postcondition-mode [allow, deny]` to `blockstack-cli publish` command, to set the post-condition mode to allow or deny on the transaction (default is deny)
1819

1920
### Changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

stacks-common/build.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,23 +74,22 @@ fn main() {
7474
"pub const GIT_COMMIT: Option<&'static str> = {git_commit:?};\n",
7575
));
7676
if let Some(git_commit) = git_commit {
77-
println!("cargo:rustc-env=GIT_COMMIT={}", git_commit);
77+
println!("cargo:rustc-env=GIT_COMMIT={git_commit}");
7878
}
7979

8080
let git_branch = current_git_branch();
8181
rust_code.push_str(&format!(
8282
"pub const GIT_BRANCH: Option<&'static str> = {git_branch:?};\n",
8383
));
8484
if let Some(git_branch) = git_branch {
85-
println!("cargo:rustc-env=GIT_BRANCH={}", git_branch);
85+
println!("cargo:rustc-env=GIT_BRANCH={git_branch}");
8686
}
8787

8888
let is_clean = if is_working_tree_clean() { "" } else { "+" };
8989
rust_code.push_str(&format!(
90-
"pub const GIT_TREE_CLEAN: Option<&'static str> = Some(\"{}\");\n",
91-
is_clean
90+
"pub const GIT_TREE_CLEAN: Option<&'static str> = Some(\"{is_clean}\");\n",
9291
));
93-
println!("cargo:rustc-env=GIT_TREE_CLEAN={}", is_clean);
92+
println!("cargo:rustc-env=GIT_TREE_CLEAN={is_clean}");
9493

9594
let out_dir = env::var_os("OUT_DIR").unwrap();
9695
let dest_path = Path::new(&out_dir).join("versions.rs");

stacks-common/src/address/c32.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ pub fn c32_address_decode(c32_address_str: &str) -> Result<(u8, Vec<u8>), Error>
369369

370370
pub fn c32_address(version: u8, data: &[u8]) -> Result<String, Error> {
371371
let c32_string = c32_check_encode(version, data)?;
372-
Ok(format!("S{}", c32_string))
372+
Ok(format!("S{c32_string}"))
373373
}
374374

375375
#[cfg(test)]

stacks-common/src/address/mod.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,14 @@ impl fmt::Display for Error {
5656
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5757
match *self {
5858
Error::InvalidCrockford32 => write!(f, "Invalid crockford 32 string"),
59-
Error::InvalidVersion(ref v) => write!(f, "Invalid version {}", v),
59+
Error::InvalidVersion(ref v) => write!(f, "Invalid version {v}"),
6060
Error::EmptyData => f.write_str("Empty data"),
61-
Error::BadByte(b) => write!(f, "invalid base58 character 0x{:x}", b),
61+
Error::BadByte(b) => write!(f, "invalid base58 character 0x{b:x}"),
6262
Error::BadChecksum(exp, actual) => write!(
6363
f,
64-
"base58ck checksum 0x{:x} does not match expected 0x{:x}",
65-
actual, exp
64+
"base58ck checksum 0x{actual:x} does not match expected 0x{exp:x}"
6665
),
67-
Error::InvalidLength(ell) => write!(f, "length {} invalid for this base58 type", ell),
66+
Error::InvalidLength(ell) => write!(f, "length {ell} invalid for this base58 type"),
6867
Error::TooShort(_) => write!(f, "base58ck data not even long enough for a checksum"),
6968
Error::Other(ref s) => f.write_str(s),
7069
}

stacks-common/src/bitvec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ impl<const MAX_SIZE: u16> BitVec<MAX_SIZE> {
246246
.data
247247
.into_iter()
248248
.fold(String::new(), |acc, byte| {
249-
acc + &format!("{:08b}", byte).chars().rev().collect::<String>()
249+
acc + &format!("{byte:08b}").chars().rev().collect::<String>()
250250
})
251251
.chars()
252252
.take(self.len() as usize)

stacks-common/src/codec/mod.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,15 +139,13 @@ fn read_next_vec<T: StacksMessageCodec + Sized, R: Read>(
139139
if len > max_items {
140140
// too many items
141141
return Err(Error::DeserializeError(format!(
142-
"Array has too many items ({} > {}",
143-
len, max_items
142+
"Array has too many items ({len} > {max_items})"
144143
)));
145144
}
146145
} else if len != num_items {
147146
// inexact item count
148147
return Err(Error::DeserializeError(format!(
149-
"Array has incorrect number of items ({} != {})",
150-
len, num_items
148+
"Array has incorrect number of items ({len} != {num_items})"
151149
)));
152150
}
153151

stacks-common/src/deps_common/bech32/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -679,11 +679,11 @@ pub enum Error {
679679
impl fmt::Display for Error {
680680
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
681681
match *self {
682-
Error::MissingSeparator => write!(f, "missing human-readable separator, \"{}\"", SEP),
682+
Error::MissingSeparator => write!(f, "missing human-readable separator, \"{SEP}\""),
683683
Error::InvalidChecksum => write!(f, "invalid checksum"),
684684
Error::InvalidLength => write!(f, "invalid length"),
685-
Error::InvalidChar(n) => write!(f, "invalid character (code={})", n),
686-
Error::InvalidData(n) => write!(f, "invalid data point ({})", n),
685+
Error::InvalidChar(n) => write!(f, "invalid character (code={n})"),
686+
Error::InvalidData(n) => write!(f, "invalid data point ({n})"),
687687
Error::InvalidPadding => write!(f, "invalid padding"),
688688
Error::MixedCase => write!(f, "mixed-case strings not allowed"),
689689
}

0 commit comments

Comments
 (0)