Skip to content

Commit

Permalink
chore(spend_simulation): disable non-cashnote UTXO spend error out
Browse files Browse the repository at this point in the history
  • Loading branch information
maqi committed Jul 10, 2024
1 parent 71d2cc9 commit acb1d40
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions sn_node/tests/spend_simulation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -507,11 +507,17 @@ async fn verify_wallets(state: &State, client: Client) -> Result<()> {
info!("TestWallet {id} verifying status of spend: {spend:?} : {status:?}");
match status {
SpendStatus::Utxo => {
available_cash_notes
// TODO: with the new spend struct requiring `middle payment`

Check notice

Code scanning / devskim

A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note test

Suspicious comment
// the transaction no longer covers all spends to be tracked
// leaving the chance the Spend retain as UTXO even got spent properly
// Currently just log it, leave for further work of replace transaction
// with a properly formatted new instance.
if !available_cash_notes
.iter()
.find(|(c, _)| &c.unique_pubkey() == spend)
.ok_or_eyre("UTXO not found in wallet")?;
// todo: should not be present in the network.
{
warn!("UTXO spend not find as a cashnote: {spend:?}");
}
}
SpendStatus::Spent => {
let addr = SpendAddress::from_unique_pubkey(spend);
Expand Down

0 comments on commit acb1d40

Please sign in to comment.