taraxa-node icon indicating copy to clipboard operation
taraxa-node copied to clipboard

chore: improve dag sync packet processing

Open mfrankovi opened this issue 1 year ago • 0 comments

In processing DagSyncPacket on verifying the dag blocks, all the transactions were being retrieved from the local cache/db with: trx_mgr_->getBlockTransactions

This was inefficient since the packet already contains most of the transactions that are needed. Now we only query for the transactions that did not arrive with the packet which saves considerable processing.

There was no check if dag block is already known, so dag blocks were processed and verified even though there was no need for it.

mfrankovi avatar Apr 26 '24 09:04 mfrankovi