LLFourn / bdk_core_staging

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

Inserting a tx that has an input that cannot exist should be an error #133

Open LLFourn opened 1 year ago

LLFourn commented 1 year ago

Right now you can insert a tx_b spending the 1337th input of tx_a even if we have the full copy of tx_a and we know it doesn't have such an input.

Should we fix this? If we do one has to consider that we would need to evict tx_b from the graph even if we insert tx_a at a later date. The problem with that is that in ChainGraph we would need to evict it from the internal sparse chain as well. Right now we don't really allow removing txs from the chain unless it's done via a re-org.

It might be worth leaving as but worth starting the discussion.