Block: remove references to deprecated constructor

This commit is contained in:
Andreas Schildbach 2024-09-02 16:34:17 +02:00
parent 084a801e2c
commit bc7883ef8f
2 changed files with 3 additions and 2 deletions

View File

@ -312,7 +312,8 @@ public class BlockTest {
@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);

View File

@ -154,7 +154,7 @@ public class SPVBlockStoreTest {
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);