mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
wallet: Retrieve transaction annotations when listing transactions
This triple join should be efficient to read, and to process. We have a one-to-many (tx-to-annotations), followed by a one-to-one (annotation-to-channel) join, so we are limited to annotations x transactions results.
This commit is contained in:
committed by
neil saitug
parent
ddae604f3d
commit
d981b58234
@@ -936,12 +936,6 @@ static struct command_result *json_listtransactions(struct command *cmd,
|
||||
json_add_hex_talarr(response, "rawtx", txs[i].rawtx);
|
||||
json_add_u64(response, "blockheight", txs[i].blockheight);
|
||||
json_add_num(response, "txindex", txs[i].txindex);
|
||||
json_add_txtypes(response, "type", txs[i].type);
|
||||
if (txs[i].channel_id != 0) {
|
||||
json_add_num(response, "channel_id", txs[i].channel_id);
|
||||
} else {
|
||||
json_add_null(response, "channel_id");
|
||||
}
|
||||
json_object_end(response);
|
||||
}
|
||||
json_array_end(response);
|
||||
|
||||
Reference in New Issue
Block a user