onionwire: outbound tip() appends the sender's own [tip] chat line #96
Loading…
Reference in a new issue
No description provided.
Delete branch "wt/t_c8441534"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
The outbound tip path (
Node::tip,src/node.rs) signs and sends a receiptframe and a tip frame, inserts the payment row and appended
pay::receipt_chat_line— a line written from the recipient's perspective.The payer's own chat therefore showed only
[receipt] 0.5 XMRfor money theyhad just spent, while the inbound path (
ingest_tip) renderspay::tip_chat_linefor an incoming tip.This appends
pay::tip_chat_line(atomic, memo, false)right after the receiptline, so the sender sees
[tip] 0.5 XMR -- lunch (pending).verified = falseis correct: the recipient has not confirmed anything back yet.
One hunk,
src/node.rsonly — no change topay.rs,tui.rs, the walletclient or any SDK surface, so no signature moved and the SDK workspace is
untouched (no lockfile regeneration needed).
Test
outbound_tip_appends_the_senders_own_tip_chat_linedrives the shippedtip()end to end and asserts the full chat row list (receipt line, then tipline). RED first: with the append removed the test fails with
left: [("out", "[receipt] 0.5 XMR")]and no tip row.Placement deviation, disclosed: the card asked for
tests/wallet.rs, buttests/*.rssee only the public API andNode::start/start_with_passphraseare the only constructors — both bootstrap Tor and publish an onion service. A
Nodecan only be built offline from insidesrc/node.rs's#[cfg(test)] mod tests, so the test lives there (the same call as the ratchet cards). Itattaches a mock wallet child on loopback (Digest challenge, then one
transfer) plus a deliverer that accepts the frame, because one-shot paymentsends stay fail closed.
Verification
cargo test --locked— 291 passed, 0 failed, 4 ignoredcargo clippy --locked --all-targets -- -D warnings— clean (exit 0)rustfmt --edition 2024 --check src/node.rsreports 7 hunks, exactly the 7the same check reports on
origin/main— all inherited, none added.