Skip to content

bug(bitcoin-da): create_da_transactions_with_fee_rate panics on empty available_utxos #3258

@amathxbt

Description

@amathxbt

Description

create_da_transactions_with_fee_rate in service.rs accesses utxo_context.available_utxos[0] directly. If the slice is unexpectedly empty the process panics with an index-out-of-bounds instead of returning a typed error.

Expected behaviour

Use .first().ok_or(BitcoinServiceError::MissingUTXO)? to return a graceful error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions