atomicDEX-API icon indicating copy to clipboard operation
atomicDEX-API copied to clipboard

Panic happens with index out of bounds in utxo_common::tx_details_by_hash

Open shamardy opened this issue 1 year ago • 0 comments

This issue is transferred from komodo-wallet-desktop to here. Original issue https://github.com/KomodoPlatform/komodo-wallet-desktop/issues/2317.

Error: 29 17:26:27, common:500] panicked at 'index out of bounds: the len is 2 but the index is 2', mm2src\coins\utxo\utxo_common.rs:3119:29

The above error is probably related to an incorrect deserialization of a transaction, it would be good to add more logs to catch more info about such cases in the future. It would also be good to add a length check here https://github.com/KomodoPlatform/komodo-defi-framework/blob/cbf312ddcf6b941eef0c095b2aaa716f3ef3edf4/mm2src/coins/utxo/utxo_common.rs#L3119 to prevent this from happening in the future while logging the error instead of panicking.

shamardy avatar Jul 10 '23 20:07 shamardy