Skip to content

Commit

Permalink
Block: remove references to deprecated constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
schildbach committed Sep 2, 2024
1 parent e49aa3a commit e15783c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion core/src/test/java/org/bitcoinj/core/BlockTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,8 @@ public void isBIPs() throws Exception {
@Test
public void parseBlockWithHugeDeclaredTransactionsSize() {
Context.propagate(new Context(100, Transaction.DEFAULT_TX_FEE, false, true));
Block block = new Block(1, Sha256Hash.ZERO_HASH, Sha256Hash.ZERO_HASH, 1, 1, 1, new ArrayList<Transaction>()) {
Block block = new Block(1, Sha256Hash.ZERO_HASH, Sha256Hash.ZERO_HASH, Instant.ofEpochSecond(1), 1, 1,
new ArrayList<Transaction>()) {
@Override
protected void bitcoinSerializeToStream(OutputStream stream) throws IOException {
ByteUtils.writeInt32LE(getVersion(), stream);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public void performanceTest() throws BlockStoreException {
Stopwatch watch = Stopwatch.start();
for (int i = 0; i < ITERATIONS; i++) {
// Using i as the nonce so that the block hashes are different.
Block block = new Block(0, Sha256Hash.ZERO_HASH, Sha256Hash.ZERO_HASH, 0, 0, i,
Block block = new Block(0, Sha256Hash.ZERO_HASH, Sha256Hash.ZERO_HASH, Instant.EPOCH, 0, i,
Collections.emptyList());
StoredBlock b = new StoredBlock(block, BigInteger.ZERO, i);
store.put(b);
Expand Down

0 comments on commit e15783c

Please sign in to comment.