Skip to content

MockNetworkProvider should not throw on seen transaction resubmission #373

@mainnet-pat

Description

@mainnet-pat

Referring to these lines:

if (this.options.updateUtxoSet && this.transactionMap[txid]) {
throw new Error(`Transaction with txid ${txid} was already submitted`);
}

Full nodes do not throw if different clients or the same client submits the transaction already seen by it, because of the nature of p2p transaction propagation. Throwing is not appropriate here, a console warning would suffice.

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