diff --git a/CHANGELOG.md b/CHANGELOG.md index 83773ff..60ca284 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,13 @@ names, environment variables, exit codes, error codes, and the shape of ## [Unreleased] +## [0.5.2] - 2026-09-29 + +### Changed + +- `watch` says when a mempool transaction was replaced by another spending + the same coins (a fee bump or double-spend), instead of "Left the mempool". + ## [0.5.1] - 2026-09-27 ### Changed @@ -116,7 +123,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.5.1...HEAD +[Unreleased]: https://github.com/BlockIo/dogechain-cli/compare/v0.5.2...HEAD +[0.5.2]: https://github.com/BlockIo/dogechain-cli/compare/v0.5.1...v0.5.2 [0.5.1]: https://github.com/BlockIo/dogechain-cli/compare/v0.5.0...v0.5.1 [0.5.0]: https://github.com/BlockIo/dogechain-cli/compare/v0.4.0...v0.5.0 [0.4.0]: https://github.com/BlockIo/dogechain-cli/compare/v0.3.1...v0.4.0 diff --git a/Cargo.lock b/Cargo.lock index b8b39f7..76affa4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -342,7 +342,7 @@ dependencies = [ [[package]] name = "dogechain-cli" -version = "0.5.1" +version = "0.5.2" dependencies = [ "assert_cmd", "clap", diff --git a/Cargo.toml b/Cargo.toml index 1c105c3..4179c1e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dogechain-cli" -version = "0.5.1" +version = "0.5.2" edition = "2024" rust-version = "1.88" description = "Command-line interface for Dogechain.com" diff --git a/src/commands.rs b/src/commands.rs index 785a1ae..1a8e5be 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -663,6 +663,9 @@ fn describe_event(event: &str, d: &Value) -> String { "tx_gone" => text("txid").map(|txid| match text("reason").as_deref() { Some("mined") => format!("Confirmed in a block {txid}"), Some("dropped") => format!("Dropped from the mempool {txid}"), + Some("replaced") => format!( + "Replaced by another transaction spending the same coins (a fee bump or double-spend) {txid}" + ), _ => format!("Left the mempool {txid}"), }), "lookalike" => match (text("sender"), text("imitates")) { @@ -843,6 +846,14 @@ mod tests { ), "New transaction: 16,106.82 DOGE in outputs, including change, from A to (no address) and 2 more outputs ยท t" ); + assert_eq!( + describe_event("tx_gone", &json!({"txid": "t", "reason": "replaced"})), + "Replaced by another transaction spending the same coins (a fee bump or double-spend) t" + ); + assert_eq!( + describe_event("tx_gone", &json!({"txid": "t", "reason": "something new"})), + "Left the mempool t" + ); assert_eq!( describe_event("richlist", &json!({"height": 7, "addresses": ["a", "b"]})), "Top Doges changed at block 7: 2 addresses" diff --git a/src/schema.rs b/src/schema.rs index c30de2a..be3bc49 100644 --- a/src/schema.rs +++ b/src/schema.rs @@ -114,7 +114,7 @@ pub fn schema() -> Value { "mempool": "txs, bytes, min_fee_rate, median_fee_rate, max_fee_rate (koinu per byte), next_block_txs", "price": "usd", "tx": "txid, value_out, fee, size, n_in, n_out, from_address|null (first input), to_address|null (first output), time_seen", - "tx_gone": "txid, reason (mined | dropped)", + "tx_gone": "txid, reason (mined | dropped | replaced; replaced means a fee bump or double-spend took its place; other values may be added)", "lookalike": "txid, sender, imitates", "richlist": "height, addresses[] (top-1,000 entries changed by this block)" },