Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
blockchain: Correct invalid assertion.
This corrects the assertion in the decodeSpentTxOut function so it does not improperly cause a panic when unwinding transactions during a reorg under certain circumstances. In particular, the provided transaction version that is passed when a stxo entry does not exist is now -1 in order to properly distinguish it from the zero value. It also updates the tests accordingly. This was discovered by the reorg on testnet from block 00000000000018c58c2d2816f03dac327d975a18af6edf1a369df67ecddaf816 to 0000000000001c1161a367156465cc6226e9f862d9c585f94db5779fdf5455ff.
- Loading branch information