Reject torsioned spend keys to ensure we can spend the outputs we scan

This commit is contained in:
Luke Parker
2024-07-06 03:48:45 -04:00
parent b2c962cd3e
commit d847ec5efb
8 changed files with 39 additions and 16 deletions

View File

@@ -411,6 +411,7 @@ impl Coordinator {
rpc
.generate_blocks(
&ViewPair::new(ED25519_BASEPOINT_POINT, Zeroizing::new(Scalar::ONE))
.unwrap()
.legacy_address(Network::Mainnet),
1,
)

View File

@@ -194,7 +194,7 @@ impl Wallet {
let view_key = Scalar::random(&mut OsRng);
let view_pair =
ViewPair::new(ED25519_BASEPOINT_POINT * spend_key, Zeroizing::new(view_key));
ViewPair::new(ED25519_BASEPOINT_POINT * spend_key, Zeroizing::new(view_key)).unwrap();
let rpc = SimpleRequestRpc::new(rpc_url).await.expect("couldn't connect to the Monero RPC");