Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit cc1440a

Browse files
committed
Fix memory comparison
1 parent ef6a416 commit cc1440a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ethereumj-core/src/main/java/org/ethereum/sync/SyncManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ public boolean validateAndAddNewBlock(Block block, byte[] nodeId) {
362362
return true;
363363
}
364364
// skip if memory limit is already hit
365-
if (blocksInMem.get() > blockBytesLimit) {
365+
if ((blocksInMem.get() * getEstimatedBlockSize()) > blockBytesLimit) {
366366
return true;
367367
}
368368

0 commit comments

Comments
 (0)