mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-09-08 02:40:29 +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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user