Skip to content

feat: improve transaction broadcasting to get network a confirmation #664

Description

@xdustinface

Right now we broadcast to all connected peers which means we don't get a confirmation from the network whether the TX was accepted to the mempool or not because the peers we broadcast to won't relay the TX back to us if accepted since they know we already know the TX.

We should probably only broadcast to a subset of our connected peers so that the ones we didnt broadcast to will still relay the transaction back to us giving us the needed confirmation.

Okay like discussed on the call let's merge this like it is for now since the issues this brings with it are kind of rare. I will come up with a follow up PR to improve the broadcasting so that we will get a confirmation from the network about the broadcasted transaction to avoid storing double spends (what happens now without this check if a key gets reused between two wallets instances and one of them spends a UTXO while not being synced that the other one already spent).

Originally posted by @xdustinface in #656 (review)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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