taraxa-node
taraxa-node copied to clipboard
chore: improve dag sync packet processing
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.