From ef0c2cd8c3f398a65a60fb1179acf06143466a4f Mon Sep 17 00:00:00 2001 From: Atif Nazir Date: Sun, 11 Oct 2026 13:59:34 -0700 Subject: [PATCH] Describe the fee minimum as the least recently mined; release 0.7.3 --- CHANGELOG.md | 11 ++++++++++- Cargo.lock | 2 +- Cargo.toml | 2 +- src/commands.rs | 9 ++++++--- src/model.rs | 3 ++- src/schema.rs | 2 +- tests/cli.rs | 4 ++-- 7 files changed, 23 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d0ef9e7..47f3121 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,14 @@ names, environment variables, exit codes, error codes, and the shape of ## [Unreleased] +## [0.7.3] - 2026-10-11 + +### Changed + +- `fees` describes the minimum as the least any pool has recently mined + (which may take longer to confirm), matching how Dogechain.com now + calculates it. Dollar amounts under $0.0001 show as `<$0.0001`. + ## [0.7.2] - 2026-10-09 ### Changed @@ -166,7 +174,8 @@ names, environment variables, exit codes, error codes, and the shape of - Installers: Homebrew (`blockio/tap/dogechain`), npm (`dogechain`), shell script, PowerShell, and prebuilt binaries for macOS, Linux and Windows. -[Unreleased]: https://github.com/BlockIo/dogechain-cli/compare/v0.7.2...HEAD +[Unreleased]: https://github.com/BlockIo/dogechain-cli/compare/v0.7.3...HEAD +[0.7.3]: https://github.com/BlockIo/dogechain-cli/compare/v0.7.2...v0.7.3 [0.7.2]: https://github.com/BlockIo/dogechain-cli/compare/v0.7.1...v0.7.2 [0.7.1]: https://github.com/BlockIo/dogechain-cli/compare/v0.7.0...v0.7.1 [0.7.0]: https://github.com/BlockIo/dogechain-cli/compare/v0.6.1...v0.7.0 diff --git a/Cargo.lock b/Cargo.lock index b73481f..7d49f1b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -342,7 +342,7 @@ dependencies = [ [[package]] name = "dogechain-cli" -version = "0.7.2" +version = "0.7.3" dependencies = [ "assert_cmd", "clap", diff --git a/Cargo.toml b/Cargo.toml index 50524fe..9a182de 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dogechain-cli" -version = "0.7.2" +version = "0.7.3" edition = "2024" rust-version = "1.88" description = "Command-line interface for Dogechain.com" diff --git a/src/commands.rs b/src/commands.rs index 94f09ba..c070981 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -476,7 +476,10 @@ fn show_network(out: &mut dyn Write, r: &NetworkReply) -> Result<()> { fn show_fees(out: &mut dyn Write, r: &FeesReply) -> Result<()> { let usd = |d: Doge| { r.price_usd - .map(|p| format!(" (${:.4})", d.0 as f64 / KOINU_PER_DOGE * p)) + .map(|p| match d.0 as f64 / KOINU_PER_DOGE * p { + v if v > 0.0 && v < 0.0001 => " (<$0.0001)".to_owned(), + v => format!(" (${v:.4})"), + }) .unwrap_or_default() }; let sp = &r.simple_payment; @@ -496,14 +499,14 @@ fn show_fees(out: &mut dyn Write, r: &FeesReply) -> Result<()> { )?; writeln!( out, - "The least it can pay: {} DOGE{}.", + "The least any pool has recently mined: {} DOGE{}, which may take longer to confirm.", sp.min_fee, usd(sp.min_fee) )?; } None => writeln!( out, - "A simple payment ({} bytes) needs at least {} DOGE in fees{}.", + "The least a simple payment ({} bytes) has recently been mined with: {} DOGE{}.", sp.bytes, sp.min_fee, usd(sp.min_fee) diff --git a/src/model.rs b/src/model.rs index 63ecde7..43d5095 100644 --- a/src/model.rs +++ b/src/model.rs @@ -241,8 +241,9 @@ pub struct FeeRates { #[derive(Debug, Deserialize)] pub struct SimplePayment { pub bytes: u64, + /// The least any pool has recently mined (never below the relay floor). pub min_fee: Doge, - /// What the API suggests paying to make the next block. + /// What recent blocks show gets mined within a few minutes. #[serde(default)] pub suggested_fee: Option, } diff --git a/src/schema.rs b/src/schema.rs index b71a56b..0339b08 100644 --- a/src/schema.rs +++ b/src/schema.rs @@ -85,7 +85,7 @@ pub fn schema() -> Value { }, "fees": { "api": "GET /api/v3/fees", - "data": "fee_rate_koinu_per_byte{min, median, max}, simple_payment{bytes, min_fee, suggested_fee}, suggested_fee_rate_koinu_per_byte, suggested_fee_basis (plain English), median_fee_paid, median_fee_paid_blocks, mempool{txs, bytes, next_block_txs}, price_usd" + "data": "fee_rate_koinu_per_byte{min, median, max}, simple_payment{bytes, min_fee (the least any pool has recently mined), suggested_fee (mined within about 3 blocks 95 times in 100)}, suggested_fee_rate_koinu_per_byte, least_fee_rate_koinu_per_byte, suggested_fee_basis (plain English), median_fee_paid, median_fee_paid_blocks, mempool{txs, bytes, next_block_txs}, price_usd" }, "supply": { "api": "GET /api/v3/supply", diff --git a/tests/cli.rs b/tests/cli.rs index 0f7b35f..66c452c 100644 --- a/tests/cli.rs +++ b/tests/cli.rs @@ -386,7 +386,7 @@ fn fees_in_plain_english() { .assert() .success() .stdout(predicate::str::contains( - "A simple payment (226 bytes) needs at least 0.00226 DOGE in fees ($0.0002).", + "The least a simple payment (226 bytes) has recently been mined with: 0.00226 DOGE ($0.0002).", )) .stdout(predicate::str::contains("min 0.01, median 0.015, max 0.5")); } @@ -1104,7 +1104,7 @@ fn fees_lead_with_the_suggested_fee() { let text = String::from_utf8(out.stdout).unwrap(); assert!( text.starts_with( - "Suggested fee for a simple payment (226 bytes): 0.01 DOGE. Why: the next block has room for everything waiting.\nThe least it can pay: 0.00226452 DOGE.\n" + "Suggested fee for a simple payment (226 bytes): 0.01 DOGE. Why: the next block has room for everything waiting.\nThe least any pool has recently mined: 0.00226452 DOGE, which may take longer to confirm.\n" ), "{text}" );