feat: track shielded send txids via z_viewtransaction
Extract txids from completed z_sendmany operations and store in send_txids_ so pure shielded sends are discoverable. The network thread includes them in the enrichment set, calls z_viewtransaction, caches results in viewtx_cache_, and removes them from send_txids_.
This commit is contained in:
15
src/app.cpp
15
src/app.cpp
@@ -564,13 +564,26 @@ void App::update()
|
||||
};
|
||||
}
|
||||
}
|
||||
return [this, done, anySuccess]() {
|
||||
// Extract txids from successful operations so shielded
|
||||
// sends are discoverable by z_viewtransaction.
|
||||
std::vector<std::string> successTxids;
|
||||
for (const auto& op : result) {
|
||||
if (op.value("status", "") == "success"
|
||||
&& op.contains("result") && op["result"].contains("txid")) {
|
||||
successTxids.push_back(op["result"]["txid"].get<std::string>());
|
||||
}
|
||||
}
|
||||
return [this, done, anySuccess,
|
||||
successTxids = std::move(successTxids)]() {
|
||||
for (const auto& id : done) {
|
||||
pending_opids_.erase(
|
||||
std::remove(pending_opids_.begin(), pending_opids_.end(), id),
|
||||
pending_opids_.end());
|
||||
}
|
||||
if (anySuccess) {
|
||||
for (const auto& txid : successTxids) {
|
||||
send_txids_.insert(txid);
|
||||
}
|
||||
// Transaction confirmed by daemon — force immediate data refresh
|
||||
transactions_dirty_ = true;
|
||||
addresses_dirty_ = true;
|
||||
|
||||
Reference in New Issue
Block a user