-
Notifications
You must be signed in to change notification settings - Fork 0
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
Use only spendable output related with contract #29
Conversation
Pull Request Test Coverage Report for Build 10661143799Details
💛 - Coveralls |
3445a1f
to
7204a96
Compare
crates/wallet/src/wallet/mod.rs
Outdated
let index = match self | ||
.indexed_graph | ||
.index | ||
.index_of_spk(ScriptBuf::new_p2pkh(&payment_base.pubkey_hash()).as_script()) | ||
{ | ||
Some(i) => i, | ||
None => { | ||
return Err(GenerateContractError::InvalidPublicKey { | ||
public_key: payment_base.clone(), | ||
}) | ||
} | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
index の値を使っていないようですが、必要な処理ですか?
また、この処理だと外部で作成された公開鍵をもとに pay to contract address を計算仕様とすると、InvalidPublicKey のエラーになるのではと思いますが、送金先のアドレスを計算するために、外部のウォレットの公開鍵から pay to contract address を計算するユースケースはあると思うので、エラーにするべきではないと思います。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
これ自体は
#28 (comment)
の指摘があって、追加してますが。追加する位置を変更します。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
なるほど。意図理解しました。よろしくお願いします。
2860b44
to
2d55a71
Compare
1b08352
to
7500526
Compare
#31 でマージしました。 |
Description
This PR implements TxBuilder#add_contract_utxo to add utxo to tx_builder related with contract
Notes to the reviewers
Changelog notice
Checklists
All Submissions:
cargo fmt
andcargo clippy
before committingNew Features:
Bugfixes: