mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-08-01 12:31:23 +00:00
More attempts to fix build flakes.
This commit is contained in:
@@ -1043,12 +1043,12 @@ public class Block extends Message {
|
|||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
public Block createNextBlock(@Nullable Address to, TransactionOutPoint prevOut) {
|
public Block createNextBlock(@Nullable Address to, TransactionOutPoint prevOut) {
|
||||||
return createNextBlock(to, prevOut, Utils.currentTimeSeconds(), pubkeyForTesting, FIFTY_COINS);
|
return createNextBlock(to, prevOut, getTimeSeconds() + 5, pubkeyForTesting, FIFTY_COINS);
|
||||||
}
|
}
|
||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
public Block createNextBlock(@Nullable Address to, Coin value) {
|
public Block createNextBlock(@Nullable Address to, Coin value) {
|
||||||
return createNextBlock(to, null, Utils.currentTimeSeconds(), pubkeyForTesting, value);
|
return createNextBlock(to, null, getTimeSeconds() + 5, pubkeyForTesting, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
|
@@ -445,10 +445,16 @@ public class PeerTest extends TestWithNetworkConnections {
|
|||||||
blockChain.add(b1);
|
blockChain.add(b1);
|
||||||
Utils.rollMockClock(60 * 10); // 10 minutes later.
|
Utils.rollMockClock(60 * 10); // 10 minutes later.
|
||||||
Block b2 = makeSolvedTestBlock(b1);
|
Block b2 = makeSolvedTestBlock(b1);
|
||||||
|
b2.setTime(Utils.currentTimeSeconds());
|
||||||
|
b2.solve();
|
||||||
Utils.rollMockClock(60 * 10); // 10 minutes later.
|
Utils.rollMockClock(60 * 10); // 10 minutes later.
|
||||||
Block b3 = makeSolvedTestBlock(b2);
|
Block b3 = makeSolvedTestBlock(b2);
|
||||||
|
b3.setTime(Utils.currentTimeSeconds());
|
||||||
|
b3.solve();
|
||||||
Utils.rollMockClock(60 * 10);
|
Utils.rollMockClock(60 * 10);
|
||||||
Block b4 = makeSolvedTestBlock(b3);
|
Block b4 = makeSolvedTestBlock(b3);
|
||||||
|
b4.setTime(Utils.currentTimeSeconds());
|
||||||
|
b4.solve();
|
||||||
|
|
||||||
// Request headers until the last 2 blocks.
|
// Request headers until the last 2 blocks.
|
||||||
peer.setDownloadParameters(Utils.currentTimeSeconds() - (600*2) + 1, false);
|
peer.setDownloadParameters(Utils.currentTimeSeconds() - (600*2) + 1, false);
|
||||||
|
Reference in New Issue
Block a user