mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2024-11-20 02:09:29 +01:00
More attempts to fix build flakes.
This commit is contained in:
parent
bd986f35f1
commit
1db2316fc3
@ -1043,12 +1043,12 @@ public class Block extends Message {
|
||||
|
||||
@VisibleForTesting
|
||||
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
|
||||
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
|
||||
|
@ -445,10 +445,16 @@ public class PeerTest extends TestWithNetworkConnections {
|
||||
blockChain.add(b1);
|
||||
Utils.rollMockClock(60 * 10); // 10 minutes later.
|
||||
Block b2 = makeSolvedTestBlock(b1);
|
||||
b2.setTime(Utils.currentTimeSeconds());
|
||||
b2.solve();
|
||||
Utils.rollMockClock(60 * 10); // 10 minutes later.
|
||||
Block b3 = makeSolvedTestBlock(b2);
|
||||
b3.setTime(Utils.currentTimeSeconds());
|
||||
b3.solve();
|
||||
Utils.rollMockClock(60 * 10);
|
||||
Block b4 = makeSolvedTestBlock(b3);
|
||||
b4.setTime(Utils.currentTimeSeconds());
|
||||
b4.solve();
|
||||
|
||||
// Request headers until the last 2 blocks.
|
||||
peer.setDownloadParameters(Utils.currentTimeSeconds() - (600*2) + 1, false);
|
||||
|
Loading…
Reference in New Issue
Block a user