tari-project / tari

The Tari protocol
https://tari.com
BSD 3-Clause "New" or "Revised" License
347 stars 214 forks source link

Cleanup wallet OMS output import #5002

Open SWvheerden opened 1 year ago

SWvheerden commented 1 year ago

Currently, the wallet has 5 import requests for importing outputs

AddOutput((Box<UnblindedOutput>, Option<SpendingPriority>)),
    AddRewindableOutput((Box<UnblindedOutput>, Option<SpendingPriority>, Option<RewindData>)),
    AddOutputWithTxId((TxId, Box<UnblindedOutput>, Option<SpendingPriority>)),
    AddRewindableOutputWithTxId((TxId, Box<UnblindedOutput>, Option<SpendingPriority>, Option<RewindData>)),
    AddUnvalidatedOutput((TxId, Box<UnblindedOutput>, Option<SpendingPriority>)),

We can combine them into a single request AddUnvalidatedOutputand make the other data options. We only need to add invalidated outputs as the validation service will be triggered as soon as the output is added which will validate the output.

SWvheerden commented 1 year ago

This has been reduced to 3, but we can still elimante 1.