walletrpc: add new RemoveTransaction endpoint.

The RemoveTransaction endpoint removes the transaction with the
provided txid including all its descendants from the internal wallet.

We still keep watching for the address of the transation in case
the transcation is confirmed nonetheless. This command is particular
useful for neutrino backends because new bitcoind versions do not
reply with an invalid transaction error code when the tx published
fails to be included into the mempool (fullnodes do).
This commit is contained in:
ziggie
2023-11-07 13:00:59 +01:00
parent 2bc6b22a43
commit 227ac770af
8 changed files with 910 additions and 561 deletions

View File

@@ -208,6 +208,13 @@ service WalletKit {
*/
rpc PublishTransaction (Transaction) returns (PublishResponse);
/* lncli: `wallet removetx`
RemoveTransaction attempts to remove the provided transaction from the
internal transaction store of the wallet.
*/
rpc RemoveTransaction (GetTransactionRequest)
returns (RemoveTransactionResponse);
/*
SendOutputs is similar to the existing sendmany call in Bitcoind, and
allows the caller to create a transaction that sends to several outputs at
@@ -751,6 +758,7 @@ message Transaction {
*/
string label = 2;
}
message PublishResponse {
/*
If blank, then no error occurred and the transaction was successfully
@@ -762,6 +770,11 @@ message PublishResponse {
string publish_error = 1;
}
message RemoveTransactionResponse {
// The status of the remove transaction operation.
string status = 1;
}
message SendOutputsRequest {
/*
The number of satoshis per kilo weight that should be used when crafting