Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions simple-payments/src/signature/schnorr/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ where
// Hash everything to get verifier challenge.
// e := H(salt || pubkey || r || msg);
let mut hash_input = Vec::new();
if parameters.salt != None {
if parameters.salt.is_some() {
hash_input.extend_from_slice(&parameters.salt.unwrap());
}
hash_input.extend_from_slice(&to_bytes![sk.public_key]?);
Expand Down Expand Up @@ -157,7 +157,7 @@ where

// e = H(salt, kG, msg)
let mut hash_input = Vec::new();
if parameters.salt != None {
if parameters.salt.is_some() {
hash_input.extend_from_slice(&parameters.salt.unwrap());
}
hash_input.extend_from_slice(&to_bytes![pk]?);
Expand Down
2 changes: 1 addition & 1 deletion simple-payments/src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ impl Transaction {
// Verify the amount is available in the sender account.
result &= self.amount <= sender_acc_info.balance;
// Verify that recipient account exists.
result &= state.id_to_account_info.get(&self.recipient).is_some();
result &= state.id_to_account_info.contains_key(&self.recipient);
result
} else {
false
Expand Down