Skip to content

Edge cases: payment with multiple outputs in one tx, ambigious txs #52

@dexX7

Description

@dexX7

Current logic:

  • In the case at least at least one multisig output exists, type is not basic.

If type is basic:

  • If number of outputs > 2: start class A parsing
  • Otherwise: start BTC payment parsing

Source:

if num_of_outputs > 2: # for reference, data, marker

Payment is parsed here:

def parse_bitcoin_payment(tx, tx_hash='unknown'):

I think there may be some edge cases where a transaction is a payment, but with more than two outputs overall. This would currently slip through and be considered as class A type-ish transaction.

On a longer term I think it would be beneficial, if transactions are not parsed in a "this or that" way, but based on parsing priorities. What I mean is something like:

  • Try parse as class B multisig transaction
  • If invalid, fallback and try to parse as class A transaction
  • If invalid, fallback and try to parse as Bitcoin payment

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