Extensively test transactions

This commit is contained in:
Luke Parker
2023-04-12 08:51:40 -04:00
parent 402a7be966
commit 354ac856a5
7 changed files with 286 additions and 28 deletions

View File

@@ -96,6 +96,7 @@ pub(crate) fn verify_transaction<T: Transaction>(
}
TransactionKind::Unsigned => {}
TransactionKind::Signed(Signed { signer, nonce, signature }) => {
// TODO: Use presence as a whitelist, erroring on lack of
if next_nonces.get(&signer).cloned().unwrap_or(0) != nonce {
Err(TransactionError::Temporal)?;
}