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

fix issue with --satpoint when offset > 0. (Fix #2465) #2466

Merged
merged 5 commits into from
Sep 25, 2023
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/subcommand/wallet/inscribe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,11 @@ impl Inscribe {

let commit = client.send_raw_transaction(&signed_commit_tx)?;

let reveal = client
.send_raw_transaction(&signed_reveal_tx)
.context("Failed to send reveal transaction")?;
let reveal = match client
.send_raw_transaction(&signed_reveal_tx) {
Ok(txid) => txid,
Err(err) => return Err(anyhow!("Failed to send reveal transaction: {err}\nCommit tx {commit} will be recovered once mined"))
};

Ok(Box::new(Output {
commit,
Expand Down Expand Up @@ -368,7 +370,7 @@ impl Inscribe {
bail!("commit transaction output would be dust");
}

let mut prevouts = vec![unsigned_commit_tx.output[0].clone()];
let mut prevouts = vec![unsigned_commit_tx.output[vout].clone()];

if let Some(parent_info) = parent_info {
prevouts.insert(0, parent_info.tx_out);
Expand Down