Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chain: remove redundant Add(tx) in zmq event #877

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Jun 21, 2023

  1. chain: remove redundant Add(tx) in zmq event

    This commit removes adding tx to mempool when received from `rawtx` zmq
    to prevent the same tx gets to be added multiple times since it will be
    notified multiple times. This also means we need to send the new tx in
    `mempoolPoller` to make sure the subscriber won't miss the event.
    
    The two good cases,
    1. subscribe the input, `LookupInputSpend` return false
    2. tx seen by `rawtx` or mempool poller
    3. notified in `filterTx`
    
    1. tx seen by `rawtx` or mempool poller
    2. subscribe the input
    3. will be notified via `LookupInputSpend`
    
    The bad case is,
    1. sent by `rawtx`, which marks the tx as seen in `filterTx`
    2. subscribe the input, `LoopupInputSpend` return false
    3. sent by the mempool poller, `filterTx` will ignore this tx, thus the
       subscriber won't be notified
    yyforyongyu committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    86cdfe6 View commit details
    Browse the repository at this point in the history