Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,6 @@ private Block buildBlockWithUncles() {
.build();
// build block 4 with block 2 and block 3 as uncles
List<BlockHeader> block4Uncles = Arrays.asList(block2Header, block3Header);
return new Block(block4Header, Collections.emptyList(), block4Uncles, true, true);
return new Block(block4Header, Collections.emptyList(), block4Uncles, null, true, true);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ void informConfirmedBlockHeaders_onIrrecoverableError() throws HSMClientExceptio
blockHeaderBuilder.setNumber(1).build(),
Collections.emptyList(),
Collections.emptyList(),
null,
true,
true
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -633,11 +633,11 @@ private List<Block> buildBlocks() {
);

return Arrays.asList(
new Block(block1Header, Collections.emptyList(), block1Uncles, true, true),
new Block(block2Header, Collections.emptyList(), block2Uncles, true, true),
new Block(block3Header, Collections.emptyList(), block3Uncles, true, true),
new Block(block4Header, Collections.emptyList(), block4Uncles, true, true),
new Block(block5Header, Collections.emptyList(), block5Uncles, true, true)
new Block(block1Header, Collections.emptyList(), block1Uncles, null, true, true),
new Block(block2Header, Collections.emptyList(), block2Uncles, null, true, true),
new Block(block3Header, Collections.emptyList(), block3Uncles, null, true, true),
new Block(block4Header, Collections.emptyList(), block4Uncles, null, true, true),
new Block(block5Header, Collections.emptyList(), block5Uncles, null, true, true)
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,11 @@ private List<Block> buildBlocks() {
);

return Arrays.asList(
new Block(block1Header, Collections.emptyList(), block1Uncles, true, true),
new Block(block2Header, Collections.emptyList(), block2Uncles, true, true),
new Block(block3Header, Collections.emptyList(), block3Uncles, true, true),
new Block(block4Header, Collections.emptyList(), block4Uncles, true, true),
new Block(block5Header, Collections.emptyList(), block5Uncles, true, true)
new Block(block1Header, Collections.emptyList(), block1Uncles, null, true, true),
new Block(block2Header, Collections.emptyList(), block2Uncles, null, true, true),
new Block(block3Header, Collections.emptyList(), block3Uncles, null, true, true),
new Block(block4Header, Collections.emptyList(), block4Uncles, null, true, true),
new Block(block5Header, Collections.emptyList(), block5Uncles, null, true, true)
);
}

Expand Down Expand Up @@ -342,11 +342,11 @@ private List<Block> buildBlocksWithMultipleBrothers() {
);

return Arrays.asList(
new Block(blocks.get(0).getHeader(), Collections.emptyList(), block1Uncles, true, true),
new Block(blocks.get(1).getHeader(), Collections.emptyList(), block2Uncles, true, true),
new Block(blocks.get(2).getHeader(), Collections.emptyList(), block3Uncles, true, true),
new Block(blocks.get(3).getHeader(), Collections.emptyList(), block4Uncles, true, true),
new Block(blocks.get(4).getHeader(), Collections.emptyList(), block5Uncles, true, true)
new Block(blocks.get(0).getHeader(), Collections.emptyList(), block1Uncles, null, true, true),
new Block(blocks.get(1).getHeader(), Collections.emptyList(), block2Uncles, null, true, true),
new Block(blocks.get(2).getHeader(), Collections.emptyList(), block3Uncles, null, true, true),
new Block(blocks.get(3).getHeader(), Collections.emptyList(), block4Uncles, null, true, true),
new Block(blocks.get(4).getHeader(), Collections.emptyList(), block5Uncles, null, true, true)
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ private Block createBlock(int blockNumber, List<Transaction> rskTxs) {
BlockHeader blockHeader = new BlockHeaderBuilder(mock(ActivationConfig.class)).setNumber(
blockNumber).setParentHashFromKeccak256(TestUtils.createHash(parentBlockNumber))
.build();
return new Block(blockHeader, rskTxs, Collections.emptyList(), true, true);
return new Block(blockHeader, rskTxs, Collections.emptyList(), null, true, true);
}

@Test
Expand Down Expand Up @@ -154,7 +154,7 @@ void createHSMVersion2Message() throws SignerMessageBuilderException {
void buildMessageForIndex_fails() {
BlockHeaderBuilder blockHeaderBuilder = new BlockHeaderBuilder(
mock(ActivationConfig.class));
Block block = new Block(blockHeaderBuilder.setNumber(1).build(), Collections.singletonList(pegoutCreationRskTx), Collections.emptyList(), true, true);
Block block = new Block(blockHeaderBuilder.setNumber(1).build(), Collections.singletonList(pegoutCreationRskTx), Collections.emptyList(), null, true, true);

ReleaseCreationInformation releaseCreationInformation = new ReleaseCreationInformation(
block, pegoutCreationRskTxReceipt, pegoutCreationRskTx.getHash(), mock(BtcTransaction.class),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ void test_buildFromConfig_hsm(int version) throws HSMUnsupportedVersionException
blockHeaderBuilder.setNumber(1).build(),
Collections.emptyList(),
Collections.emptyList(),
null,
true,
true
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ void ensureSignerAncestorBlockInPosition_hsm_throws_exception() throws Exception
blockHeaderBuilder.setNumber(1).build(),
Collections.emptyList(),
Collections.emptyList(),
null,
true,
true
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static Block createBlock(int blockNumber, List<Transaction> rskTxs) {
.setNumber(blockNumber)
.setParentHashFromKeccak256(TestUtils.createHash(parentBlockNumber))
.build();
return new Block(blockHeader, rskTxs, Collections.emptyList(), true, true);
return new Block(blockHeader, rskTxs, Collections.emptyList(), null, true, true);
}

public static Keccak256 createHash(int nHash) {
Expand Down