Skip to content

Commit aa3019c

Browse files
Merge pull request #223 from chippr-robotics/copilot/fix-integration-test-failures
Fix block header timestamp in fast sync integration tests
2 parents a04b64f + 665d984 commit aa3019c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/it/scala/com/chipprbots/ethereum/sync/util/CommonFakePeer.scala

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,12 @@ abstract class CommonFakePeer(peerName: String, fakePeerCustomConfig: FakePeerCu
322322
val newBlockNumber = parent.header.number + 1
323323
val newWorld = updateWorldForBlock(newBlockNumber, parentWorld)
324324
val newBlock = parent.copy(header =
325-
parent.header.copy(parentHash = parent.header.hash, number = newBlockNumber, stateRoot = newWorld.stateRootHash)
325+
parent.header.copy(
326+
parentHash = parent.header.hash,
327+
number = newBlockNumber,
328+
stateRoot = newWorld.stateRootHash,
329+
unixTimestamp = parent.header.unixTimestamp + 1
330+
)
326331
)
327332
val newWeight = parentWeight.increase(newBlock.header)
328333
(newBlock, newWeight, parentWorld)

0 commit comments

Comments
 (0)