LLFourn / bdk_core_staging

Staging area for bdk_core initial development
15 stars 12 forks source link

Tx graph changes should be error free #132

Closed LLFourn closed 1 year ago

LLFourn commented 1 year ago

7440681e88850e438c9e4a938cce021e4714c3ea added an error case for the tx graph struct where it would return an error when a txout "conficts". This seems to mean an update contains a txout not attached a tx that doesn't agree with what was there before.

I don't think we should have this error case. It is more likely to create a security bug from the extra friction it creates than to solve one. Consider that if you already have the full tx and an update contains an erroneous output where as before it would have done the right thing by ignoring it, there is now an error case. If previously there was a dangling txout then we can just replace it with the new one. If the user does not like the ambiguity of these txouts then they can just