Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ names, environment variables, exit codes, error codes, and the shape of

## [Unreleased]

## [0.7.4] - 2026-10-19

### Fixed

- `tx` no longer fails in the few seconds after a transaction's block is
found, when its time is not known yet; it says "time not known yet".

## [0.7.3] - 2026-10-11

### Changed
Expand Down Expand Up @@ -174,7 +181,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.3...HEAD
[Unreleased]: https://github.com/BlockIo/dogechain-cli/compare/v0.7.4...HEAD
[0.7.4]: https://github.com/BlockIo/dogechain-cli/compare/v0.7.3...v0.7.4
[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
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "dogechain-cli"
version = "0.7.3"
version = "0.7.4"
edition = "2024"
rust-version = "1.88"
description = "Command-line interface for Dogechain.com"
Expand Down
2 changes: 1 addition & 1 deletion scripts/check-api-contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
("/blocks/latest", [], ["blocks"]),
("/blocks/latest", ["blocks", "[]"], ["height", "time", "num_txs", "reward_and_fees"]),
("/tx/{txid}", [], ["transaction", "explain"]),
("/tx/{txid}", ["transaction"], ["hash", "confirmations", "time", "fee", "size",
("/tx/{txid}", ["transaction"], ["hash", "confirmations", "fee", "size",
"inputs", "outputs"]),
("/tx/{txid}", ["transaction", "outputs", "[]"], ["index", "value"]),
("/tx/{txid}", ["explain"], ["headline", "detail"]),
Expand Down
6 changes: 5 additions & 1 deletion src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,11 @@ fn show_tx(out: &mut dyn Write, r: &TxReply, explain_only: bool) -> Result<()> {
),
_ => "waiting in the mempool (unconfirmed)".into(),
};
writeln!(out, "Status {status} · {}", utc(tx.time))?;
let when = tx
.time
.map(utc)
.unwrap_or_else(|| "time not known yet".into());
writeln!(out, "Status {status} · {when}")?;
writeln!(out, "From:")?;
for i in &tx.inputs {
let who = i.address.as_deref().unwrap_or("newly mined coins");
Expand Down
3 changes: 2 additions & 1 deletion src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ pub struct Transaction {
pub hash: String,
pub confirmations: i64,
pub block_height: Option<u64>,
pub time: i64,
/// None for a few seconds while the transaction's block is being added.
pub time: Option<i64>,
pub fee: Doge,
pub size: u64,
pub inputs: Vec<Input>,
Expand Down
2 changes: 1 addition & 1 deletion src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pub fn schema() -> Value {
"tx <txid> [--explain]": {
"api": "GET /api/v3/tx/<txid>",
"data": {
"transaction": "hash, confirmations, block_hash, block_height|null, time, fee, size, vsize, locktime, inputs[{index, address|null, value, previous_output{hash,index}}], outputs[{index, address|null, value, is_change, spent}]",
"transaction": "hash, confirmations, block_hash, block_height|null, time|null (briefly null while its block is being added), fee, size, vsize, locktime, inputs[{index, address|null, value, previous_output{hash,index}}], outputs[{index, address|null, value, is_change, spent}]",
"explain": "headline, detail, sent, change, fee, change_outputs[index]",
"warnings": "[{kind: \"lookalike_sender\", sender, imitates, receiver, shared_prefix, sender_kind, real_txid}]"
},
Expand Down
13 changes: 13 additions & 0 deletions tests/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1109,3 +1109,16 @@ fn fees_lead_with_the_suggested_fee() {
"{text}"
);
}

#[test]
fn tx_time_can_be_unknown_briefly() {
let mut t = tx(json!([]));
t["transaction"]["time"] = Value::Null;
dogechain(&mock(vec![ok(t)]))
.args(["tx", TXID])
.assert()
.success()
.stdout(predicate::str::contains(
"Status waiting in the mempool (unconfirmed) · time not known yet",
));
}
Loading