Wait for an push transactions that hasn't yet appeared in the mempool

This commit is contained in:
softsimon
2020-04-13 01:26:53 +07:00
parent 36d88fec9c
commit d432b3ce4a
5 changed files with 90 additions and 33 deletions

View File

@@ -133,6 +133,13 @@ class WebsocketHandler {
response['mempool-blocks'] = mBlocks;
}
if (client['track-tx']) {
const tx = newTransactions.find((t) => t.txid === client['track-tx']);
if (tx) {
response['tx'] = tx;
}
}
// Send all new incoming transactions related to tracked address
if (client['track-address']) {
const foundTransactions: TransactionExtended[] = [];