Currently, electrum, or at least the reassert script, will place both inbound and outbound transactions in the Redis key, clogging it up. Modify to have it only put inbound transactions.
To do this would require hitting electrum back inline in the webhook handler. We already do two redis lookups and a db query inline, so maybe we can add this or maybe we can make the script handle the queue more effectively.
I think we’ve hit a point where we should consider having the webhook just queue the address for checks, and do everything async.
- pending btc job should store in a redis set the addr+hash of any outbound tx it skips (or really any tx it legitimately skips but that’s just outbound for now)
- inbound webhook should check that redis set and not enqueue items that are in it
- inbound webhook should do not work inline at all, queue job to redis and process in background