Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RBF our CPFP transactions #333

Merged
merged 2 commits into from
Jan 8, 2022
Merged

RBF our CPFP transactions #333

merged 2 commits into from
Jan 8, 2022

Conversation

darosior
Copy link
Member

@darosior darosior commented Dec 13, 2021

No description provided.

@darosior
Copy link
Member Author

I think we should rework cpfp_txin on revault_tx side. We probably need to explicit which output is the CPFP, which we could do with a proprietary field.

@darosior
Copy link
Member Author

Rebased, just waiting on revault/revault_tx#119 to be merged to point at revault_tx's master

@darosior darosior changed the title WIP: RBF our CPFP transactions RBF our CPFP transactions Dec 24, 2021
@darosior darosior force-pushed the cpfp_rbf branch 2 times, most recently from d564f5f to 3ab5eba Compare December 24, 2021 12:22
Copy link
Collaborator

@danielabrozzoni danielabrozzoni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still need to run the tests locally, but the code looks good :)

src/daemon/database/actions.rs Outdated Show resolved Hide resolved
let derived_cpfp_descriptor = revaultd
.derived_cpfp_descriptor(my_listunspent[i].derivation_index.expect("Must be here"));
match tx.cpfp_txin(&derived_cpfp_descriptor) {
match tx.cpfp_txin(cpfp_descriptor, &revaultd.secp_ctx) {
Some(txin) => txins.push(txin),
None => {
log::error!("No CPFP txin for tx '{}'", tx.txid());
return Ok(());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw this deactivates the CPFP altogether if some txin is not found. Maybe we just want to avoid cpfping that specific transaction and CPFPing the others?
(Not necessarily to be fixed in this PR)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah i noted that but didn't want to address it here (it'd also (for now) not happen with a transaction we'd have created).

@danielabrozzoni
Copy link
Collaborator

ACK ae055f2

@darosior darosior merged commit 6ac8ff1 into revault:master Jan 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants