Skip to content

Commit

Permalink
Remove/change old PSKB comments and commented out inclusions.
Browse files Browse the repository at this point in the history
  • Loading branch information
1bananagirl committed Aug 4, 2024
1 parent 6372c36 commit 7fb6771
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 3 additions & 3 deletions wallet/core/src/account/pskb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ impl Stream for PSKTStream {
type Item = Result<PSKT<Signer>, Error>;

fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
let this = self.as_ref(); // Access the mutable reference to self
let this = self.as_ref();

let _prefix = this.prefix;
let _signer = this.signer.clone();
Expand Down Expand Up @@ -192,8 +192,8 @@ pub async fn pskb_signer_for_address(
let hash = calc_schnorr_signature_hash(&tx.as_verifiable(), idx, sighash[idx], &mut reused_values);
let msg = secp256k1::Message::from_digest_slice(hash.as_bytes().as_slice()).unwrap();

// When address represents a lock utxo, no private key is available.
// Instead, use the account receive address private key.
// When address represents a locked UTXO, no private key is available.
// Instead, use the account receive address' private key.
let address: &Address = match sign_for_address {
Some(address) => address,
None => addresses.get(idx).expect("Input indexed address"),
Expand Down
3 changes: 0 additions & 3 deletions wallet/pskt/src/bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,8 @@ mod tests {
use crate::prelude::*;
use crate::role::Creator;
use crate::role::*;
// hashing::sighash::{calc_schnorr_signature_hash, SigHashReusedValues},
use kaspa_consensus_core::tx::{TransactionId, TransactionOutpoint, UtxoEntry};
use kaspa_txscript::{multisig_redeem_script, pay_to_script_hash_script};
// use kaspa_txscript::{multisig_redeem_script, opcodes::codes::OpData65, pay_to_script_hash_script, script_builder::ScriptBuilder};
use secp256k1::Secp256k1;
use secp256k1::{rand::thread_rng, Keypair};
use std::str::FromStr;
Expand Down Expand Up @@ -259,7 +257,6 @@ mod tests {

assert!(!bundle.0.is_empty());

// todo: discuss why deserializing from MessagePack errors
match Bundle::deserialize(&serialized) {
Ok(bundle_constructor_deser) => {
println!("Deserialized: {:?}", bundle_constructor_deser);
Expand Down

0 comments on commit 7fb6771

Please sign in to comment.