3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-01-30 23:02:15 +00:00

Clone cached hash in Block.cloneAsHeader(). Before this hash recalculation was about half the time spent inside BoundedOverheadBlockStore.put(), now it does not appear in the profiles.

This commit is contained in:
Mike Hearn 2011-07-06 15:30:08 +00:00
parent 5dbd6c638b
commit d654a33376

View File

@ -178,7 +178,7 @@ public class Block extends Message {
block.time = time;
block.difficultyTarget = difficultyTarget;
block.transactions = null;
block.hash = null;
block.hash = getHash().clone();
return block;
}