Skip to content

Commit

Permalink
Merge #9: eliminate redundant keypair generation code
Browse files Browse the repository at this point in the history
1e475a5 Eliminate redundant keypair generation code (Sebastian Falbesoner)

Tree-SHA512: 43a1a701adc919b139694bf1d1637be8a9ff3775403d1971284103e9ec3a8b11364a2ab22b24233a0e1c8e01584c7006e2851782837fccd635519f91154b913b
  • Loading branch information
chris-belcher committed Jan 14, 2021
2 parents a4128c6 + 1e475a5 commit 450f8dc
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/wallet_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -844,13 +844,7 @@ impl Wallet {
rpc: &Client,
other_pubkey: &PublicKey,
) -> (Address, SecretKey) {
let mut my_privkey_bytes = [0u8; 32];
OsRng.fill_bytes(&mut my_privkey_bytes);
//let my_privkey_bytes = [0xbb; 32];

let secp = Secp256k1::new();
let my_privkey = secp256k1::SecretKey::from_slice(&my_privkey_bytes).unwrap();
let my_pubkey = secp256k1::PublicKey::from_secret_key(&secp, &my_privkey);
let (my_pubkey, my_privkey) = generate_keypair();

let descriptor = rpc
.get_descriptor_info(&format!(
Expand Down

0 comments on commit 450f8dc

Please sign in to comment.