listtransactions: get rid of per-tx type annotations.

We didn't actually populate them properly, and the real annotations
are on inputs and outputs.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-EXPERIMENTAL: JSON-RPC: `listtransactions` `channel` and `type` field removed at top level.
This commit is contained in:
Rusty Russell
2023-01-30 16:36:03 +10:30
committed by Alex Myers
parent 578f075407
commit 611795beee
25 changed files with 23 additions and 235 deletions

View File

@@ -329,20 +329,16 @@ static void handle_onchain_broadcast_tx(struct channel *channel,
{
struct bitcoin_tx *tx;
struct wallet *w = channel->peer->ld->wallet;
struct bitcoin_txid txid;
enum wallet_tx_type type;
bool is_rbf;
if (!fromwire_onchaind_broadcast_tx(msg, msg, &tx, &type, &is_rbf)) {
if (!fromwire_onchaind_broadcast_tx(msg, msg, &tx, &is_rbf)) {
channel_internal_error(channel, "Invalid onchain_broadcast_tx");
return;
}
tx->chainparams = chainparams;
bitcoin_txid(tx, &txid);
wallet_transaction_add(w, tx->wtx, 0, 0);
wallet_transaction_annotate(w, &txid, type, channel->dbid);
/* We don't really care if it fails, we'll respond via watch. */
/* If the onchaind signals this as RBF-able, then we also