Skip to content

Commit ae94b9a

Browse files
committed
Adapt the doc single-cancel wording to multi-cancel
1 parent 32a7ec5 commit ae94b9a

File tree

7 files changed

+15
-14
lines changed

7 files changed

+15
-14
lines changed

doc/API.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ Retrieve the status of the servers, such as the coordinator, the cosigners, the
121121
| 5 | `active` | Everyone signed and shared the Unvault transaction signature for this vault |
122122
| 6 | `unvaulting` | The vault has its unvault tx broadcasted |
123123
| 7 | `unvaulted` | The vault has its unvault tx confirmed |
124-
| 8 | `cancelling` | The vault has its cancel tx broadcasted, funds are sent to an other vault |
125-
| 9 | `cancelled` | The vault has its cancel tx confirmed, funds are in an other vault |
124+
| 8 | `cancelling` | The vault has one cancel tx broadcasted, funds are sent to an other vault |
125+
| 9 | `cancelled` | The vault has one cancel tx confirmed, funds are in an other vault |
126126
| 4 / 8 | `emergency_vaulting` | The vault has its emergency tx broadcasted, funds are sent to the Deep Emergency Vault |
127127
| 5 / 9 | `emergency_vaulted` | The vault has its emergency tx confirmed, funds are in the Deep Emergency Vault |
128128
| 8 | `spendable` | The vault has its unvault tx timelock expired and can be spent |

src/bitcoind/poller.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,7 +1113,7 @@ fn update_tip(
11131113
// Which kind of transaction may spend the Unvault transaction.
11141114
#[derive(Debug)]
11151115
enum UnvaultSpender {
1116-
// The Cancel, spending via the stakeholders path to a new deposit
1116+
// A Cancel, spending via the stakeholders path to a new deposit
11171117
Cancel(Txid),
11181118
// The Spend, any transaction spending via the managers path
11191119
Spend(Txid),
@@ -1160,12 +1160,12 @@ fn unvault_spender(
11601160
// FIXME: be smarter, all the information are in the previous call, no need for a
11611161
// second one.
11621162

1163-
// Let's double-check that we didn't fetch the cancel, nor the unemer
1164-
// In theory (read edge cases), the Cancel and UnEmer could have not been
1163+
// Let's double-check that we didn't fetch a cancel, nor the unemer
1164+
// In theory (read edge cases), a Cancel and UnEmer could have not been
11651165
// current at the last bitcoind poll but could be now.
11661166
// Be sure to not wrongly mark a Cancel or UnEmer as a Spend!
11671167
if cancel_txids.contains(&spender_txid) || Some(spender_txid) == unemer_txid {
1168-
// Alright, the spender is the cancel or the unemer,
1168+
// Alright, the spender is a cancel or the unemer,
11691169
// but we just checked and they weren't current. We'll return None
11701170
// so the checker will call this function again.
11711171
return Ok(None);

src/bitcoind/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ pub fn presigned_transactions(
4949
})?;
5050

5151
// Reconstruct the deposit UTXO and derive all pre-signed transactions out of it
52-
// if we are a stakeholder, and only the Unvault and the Cancel if we are a manager.
52+
// if we are a stakeholder, and only the Unvault and the Cancels if we are a manager.
5353
if revaultd.is_stakeholder() {
5454
let emer_address = revaultd
5555
.emergency_address

src/commands/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,7 +1360,8 @@ impl DaemonControl {
13601360
Ok(())
13611361
}
13621362

1363-
/// Broadcast the Cancel transaction for an unvaulted vault.
1363+
/// Broadcast a Cancel transaction for an unvaulted vault. Currently picks the lower feerate
1364+
/// one.
13641365
///
13651366
/// ## Errors
13661367
/// - If the outpoint doesn't refer to an existing, unvaulted (or unvaulting) vault
@@ -1370,7 +1371,7 @@ impl DaemonControl {
13701371
let db_path = revaultd.db_file();
13711372

13721373
// Checking that the vault is secured, otherwise we don't have the cancel
1373-
// transaction
1374+
// transactions
13741375
let vault = db_vault_by_deposit(&db_path, &deposit_outpoint)
13751376
.expect("Database must be accessible")
13761377
.ok_or_else(|| CommandError::UnknownOutpoint(deposit_outpoint))?;

src/jsonrpc/api.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ pub trait RpcApi {
9797
index: Option<bip32::ChildNumber>,
9898
) -> jsonrpc_core::Result<serde_json::Value>;
9999

100-
/// Get the cancel and both emergency transactions for a vault identified by its deposit
100+
/// Get the cancels and both emergency transactions for a vault identified by its deposit
101101
/// outpoint.
102102
#[rpc(meta, name = "getrevocationtxs")]
103103
fn getrevocationtxs(

src/revaultd.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ pub enum VaultStatus {
5656
Unvaulting,
5757
/// The unvault transaction is confirmed
5858
Unvaulted,
59-
/// The cancel transaction has been broadcast
59+
/// A cancel transaction has been broadcast
6060
Canceling,
61-
/// The cancel transaction is confirmed
61+
/// A cancel transaction is confirmed
6262
Canceled,
6363
/// The first emergency transactions has been broadcast
6464
EmergencyVaulting,

tests/test_rpc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,7 @@ def test_getspendtx(revault_network, bitcoind):
977977
@pytest.mark.skipif(not POSTGRES_IS_SETUP, reason="Needs Postgres for servers db")
978978
def test_revault_command(revault_network, bitcoind, executor):
979979
"""
980-
Here we manually broadcast the unvualt_tx, followed by the cancel_tx
980+
Here we manually broadcast the unvualt_tx, followed by a cancel_tx
981981
"""
982982
revault_network.deploy(3, 1)
983983
man = revault_network.man(0)
@@ -1026,7 +1026,7 @@ def test_revault_command(revault_network, bitcoind, executor):
10261026
== "unvaulting"
10271027
)
10281028

1029-
# Nah it's not, just broadcast the cancel
1029+
# Nah it's not, just broadcast a cancel
10301030
man.rpc.revault(deposit)
10311031

10321032
# Not confirmed yet...

0 commit comments

Comments
 (0)