When you do add_utxo you should be able to add a utxo that has already been spent in that there is a transaction that has spent it seen by the wallet. One way to do this would to not delete the utxo from the database after you see a transaction spending it but just mark the utxo with that txid.
When you do
add_utxoyou should be able to add a utxo that has already been spent in that there is a transaction that has spent it seen by the wallet. One way to do this would to not delete the utxo from the database after you see a transaction spending it but just mark the utxo with that txid.