Skip to content
This repository has been archived by the owner on Aug 23, 2020. It is now read-only.

Feature: Add solidification stage to pipeline and only broadcast solid transactions #1646

Open
wants to merge 79 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
53ea166
Add ubiquitous Broadcast Queue
DyrellC Oct 14, 2019
be7c132
Update unit tests with broadcasting queue
DyrellC Oct 15, 2019
6593388
Remove unneeded log
DyrellC Oct 17, 2019
33f193f
Merge branch 'dev' into add-Broadcast-queue
Oct 30, 2019
ff58495
Fix broadcast queue injection
DyrellC Nov 4, 2019
1a0ea43
remove unused function
DyrellC Nov 4, 2019
ad3a203
Merge branch 'add-Broadcast-queue' of https://github.com/DyrellC/iri …
DyrellC Nov 4, 2019
2283fb0
Merge branch 'dev' of https://github.com/iotaledger/iri into add-Broa…
DyrellC Nov 4, 2019
24e31a5
Clean up imports
DyrellC Nov 4, 2019
03590dd
Remove BroadcastQueue, add TransactionSolidifier class
DyrellC Nov 8, 2019
06242eb
Add docs
DyrellC Nov 8, 2019
1ec3794
Add to solidification queue if update status fails
DyrellC Nov 8, 2019
bc5897f
Fix network injection test
DyrellC Nov 8, 2019
62a2330
Remove unused import, lower checkSolidity complexity
DyrellC Nov 8, 2019
9fc4cba
Reduce complexity further
DyrellC Nov 8, 2019
ccca691
Comments
DyrellC Nov 8, 2019
f0c1955
Change queue type, log error messages differentely
DyrellC Nov 12, 2019
fa72acc
Condense code slightly
DyrellC Nov 12, 2019
c3b1417
Synchronize solidifier queue access, add received transactions to sol…
DyrellC Nov 13, 2019
1538b36
Move solidification queue entry point, reduce interval for scans
DyrellC Nov 14, 2019
a34c5e8
Broadcast from reply stage to increase transactions to request speed
DyrellC Nov 18, 2019
14e784d
Merge branch 'dev' into add-Broadcast-queue
Nov 19, 2019
89ec550
Clean up PR, add interface
DyrellC Nov 21, 2019
8801ef2
Add unit tests
DyrellC Nov 21, 2019
26b9521
Wrap in try/catch, fix styling
DyrellC Nov 21, 2019
16170cf
Merge branch 'add-Broadcast-queue' of https://github.com/DyrellC/iri …
DyrellC Nov 21, 2019
7e34c91
Update src/main/java/com/iota/iri/network/pipeline/TransactionProcess…
DyrellC Nov 27, 2019
778c833
Remove solidification from broadcast queue next stage
DyrellC Nov 27, 2019
0b61c89
Add quick solid transactions to broadcast queue, comments and tests u…
DyrellC Nov 27, 2019
1a2d950
Merge branch 'add-Broadcast-queue' of https://github.com/DyrellC/iri …
DyrellC Nov 27, 2019
864c2db
codacy conflict
DyrellC Nov 27, 2019
4bfb138
Add messages to solidifier test
DyrellC Nov 27, 2019
d623d1d
Pop eldest on queue fill
DyrellC Nov 27, 2019
48258b1
Remove unused function
DyrellC Nov 27, 2019
1cde4bf
Iterator -> poll()
DyrellC Nov 27, 2019
6543981
Add transaction solidification stage
DyrellC Dec 2, 2019
7b4d3c5
Comments/clean-up
DyrellC Dec 2, 2019
5e0a974
update tests
DyrellC Dec 2, 2019
f86fe55
Remove unused payload Mock
DyrellC Dec 2, 2019
de08907
Remove log
DyrellC Dec 2, 2019
4086fce
Remove circular solidified queue
DyrellC Dec 2, 2019
b16c752
Make addToBroadcastQueue private again
DyrellC Dec 4, 2019
f5de8fe
Ensure solidTip is solid before broadcasting
DyrellC Dec 4, 2019
30f226e
Update tests, only broadcast solid transactions from solidify stage
DyrellC Dec 4, 2019
303648b
Move validator test to appropriate package
DyrellC Dec 5, 2019
7e36e1c
Downgrade log error to log info
DyrellC Dec 5, 2019
eb53b2f
Remove unnecessary solidity propogation thread in validator
DyrellC Dec 10, 2019
0409d3e
only import used parts of junit
DyrellC Dec 10, 2019
1b5294a
Add propagation queue back, remove addToSolidificationQueue from soli…
DyrellC Dec 24, 2019
ab6e628
Codacy corrections
DyrellC Dec 30, 2019
839d9cb
Move update status from validation to solidification
DyrellC Dec 30, 2019
031180b
Merge branch 'dev' of https://github.com/iotaledger/iri into add-Broa…
DyrellC Dec 30, 2019
f61e6ff
Codacy conflicts
DyrellC Dec 30, 2019
6e0a383
reremove old transaction validator
DyrellC Dec 30, 2019
4126903
Merge branch 'dev' into add-Broadcast-queue
Jan 6, 2020
ff4a13c
Fix codacy import error, break up runValidation
DyrellC Jan 6, 2020
5bd3066
Merge branch 'add-Broadcast-queue' of https://github.com/DyrellC/iri …
DyrellC Jan 6, 2020
10baada
Merge branch 'dev' into add-Broadcast-queue
DyrellC Jan 15, 2020
4327b10
Merge branch 'dev' into add-Broadcast-queue
DyrellC Jan 16, 2020
092cfa5
Merge branch 'dev' of https://github.com/iotaledger/iri into add-Broa…
DyrellC Jan 17, 2020
cc220b0
Merge branch 'add-Broadcast-queue' of https://github.com/DyrellC/iri …
DyrellC Jan 17, 2020
82359a7
Update regression logging
DyrellC Jan 21, 2020
7adfdc5
Merge branch 'dev' of https://github.com/iotaledger/iri into add-Broa…
DyrellC Jan 21, 2020
d3baeee
Remove double import from merge
DyrellC Jan 21, 2020
ffea048
Verbose logging for debugging
DyrellC Jan 21, 2020
0f29416
Merge branch 'dev' of https://github.com/iotaledger/iri into add-Broa…
DyrellC Feb 3, 2020
0084b48
Merge branch 'dev' of https://github.com/iotaledger/iri into add-Broa…
DyrellC Feb 6, 2020
4664000
Revert "Fix: sort milestone candidates before analyzing for faster so…
DyrellC Feb 10, 2020
cc5e8b8
Broadcast latest tip even if not solid (will be latest milestone)
DyrellC Feb 14, 2020
d488a1d
Correct cpu load issues
DyrellC Feb 26, 2020
9ad4886
Remove max to propagation cascade
DyrellC Feb 26, 2020
9ab2a7d
Reintroduce limiter to adding duplicates for solidification
DyrellC Feb 26, 2020
5663d30
Merge branch 'dev' of https://github.com/iotaledger/iri into dev
DyrellC Mar 5, 2020
b2cb269
Update DagHelper
DyrellC Mar 6, 2020
31223b3
Update regression logging
DyrellC Jan 21, 2020
ea3bbf8
Move validation to validation service package
DyrellC Mar 18, 2020
e4feaf6
Merge branch 'update-regression-logging' into merge-transaction-solid…
DyrellC Mar 18, 2020
059e7e4
Merge branch 'dev' of https://github.com/iotaledger/iri into add-Broa…
DyrellC Mar 18, 2020
7528b22
Merge branch 'merge-transaction-solidifier' into add-Broadcast-queue
DyrellC Mar 19, 2020
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
3 changes: 3 additions & 0 deletions src/main/java/com/iota/iri/IRI.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.iota.iri.conf.ConfigFactory;
import com.iota.iri.conf.IotaConfig;
import com.iota.iri.network.NetworkInjectionConfiguration;
import com.iota.iri.network.pipeline.BroadcastQueue;
import com.iota.iri.service.API;
import com.iota.iri.utils.IotaUtils;
import com.iota.iri.service.restserver.resteasy.RestEasy;
Expand Down Expand Up @@ -119,6 +120,7 @@ private static class IRILauncher {
public static void main(String [] args) throws Exception {
IotaConfig config = createConfiguration(args);
String version = IotaUtils.getIriVersion();
BroadcastQueue broadcastQueue = config.getBroadcastQueue();
log.info("Welcome to {} {}", config.isTestnet() ? TESTNET_NAME : MAINNET_NAME, version);

Injector injector = Guice.createInjector(
Expand All @@ -132,6 +134,7 @@ public static void main(String [] args) throws Exception {
shutdownHook();

try {
iota.configureBroadcastQueue(broadcastQueue);
iota.init();
//TODO redundant parameter but we will touch this when we refactor IXI
ixi.init(config.getIxiDir());
Expand Down
13 changes: 12 additions & 1 deletion src/main/java/com/iota/iri/Iota.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.iota.iri.network.NeighborRouter;
import com.iota.iri.network.TipsRequester;
import com.iota.iri.network.TransactionRequester;
import com.iota.iri.network.pipeline.BroadcastQueue;
import com.iota.iri.network.pipeline.TransactionProcessingPipeline;
import com.iota.iri.service.ledger.LedgerService;
import com.iota.iri.service.milestone.*;
Expand Down Expand Up @@ -106,6 +107,8 @@ public class Iota {
public final TipsViewModel tipsViewModel;
public final TipSelector tipsSelector;

private BroadcastQueue broadcastQueue;

/**
* Initializes the latest snapshot and then creates all services needed to run an IOTA node.
*
Expand Down Expand Up @@ -181,7 +184,7 @@ public void init() throws Exception {
tangle.clearMetadata(com.iota.iri.model.persistables.Transaction.class);
}

transactionValidator.init();
transactionValidator.init(this.broadcastQueue);

txPipeline.start();
neighborRouter.start();
Expand Down Expand Up @@ -274,6 +277,14 @@ private void initializeTangle() {
}
}

/**
* Sets the {@link BroadcastQueue} for this IRI instance
* @param broadcastQueue Baseline IRI {@link BroadcastQueue}
*/
public void configureBroadcastQueue(BroadcastQueue broadcastQueue){
this.broadcastQueue = broadcastQueue;
}

/**
* Creates a new Persistable provider with the supplied settings
*
Expand Down
8 changes: 5 additions & 3 deletions src/main/java/com/iota/iri/TransactionValidator.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import com.iota.iri.model.Hash;
import com.iota.iri.model.TransactionHash;
import com.iota.iri.network.TransactionRequester;
import com.iota.iri.network.pipeline.BroadcastQueue;
import com.iota.iri.service.snapshot.SnapshotProvider;
import com.iota.iri.storage.Tangle;
import org.slf4j.Logger;
Expand All @@ -33,7 +34,7 @@ public class TransactionValidator {
private static final long MAX_TIMESTAMP_FUTURE = 2L * 60L * 60L;
private static final long MAX_TIMESTAMP_FUTURE_MS = MAX_TIMESTAMP_FUTURE * 1_000L;


private BroadcastQueue broadcastQueue;
/////////////////////////////////fields for solidification thread//////////////////////////////////////

private Thread newSolidThread;
Expand Down Expand Up @@ -85,7 +86,8 @@ public class TransactionValidator {
*
* @see #spawnSolidTransactionsPropagation()
*/
public void init() {
public void init(BroadcastQueue broadcastQueue) {
this.broadcastQueue = broadcastQueue;
DyrellC marked this conversation as resolved.
Show resolved Hide resolved
newSolidThread.start();
}

Expand Down Expand Up @@ -277,7 +279,7 @@ public boolean checkSolidity(Hash hash, int maxProcessedTransactions) throws Exc
}
}
if (solid) {
updateSolidTransactions(tangle, snapshotProvider.getInitialSnapshot(), analyzedHashes);
updateSolidTransactions(tangle, snapshotProvider.getInitialSnapshot(), analyzedHashes, broadcastQueue);
}
analyzedHashes.clear();
return solid;
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/com/iota/iri/conf/BaseIotaConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
import com.iota.iri.model.Hash;
import com.iota.iri.model.HashFactory;
import com.iota.iri.utils.IotaUtils;
import com.iota.iri.network.pipeline.BroadcastQueue;

import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
import java.util.concurrent.BlockingQueue;

import com.beust.jcommander.JCommander;
import com.beust.jcommander.Parameter;
Expand Down Expand Up @@ -56,6 +58,7 @@ public abstract class BaseIotaConfig implements IotaConfig {
protected boolean dnsRefresherEnabled = Defaults.DNS_REFRESHER_ENABLED;
protected boolean dnsResolutionEnabled = Defaults.DNS_RESOLUTION_ENABLED;
protected List<String> neighbors = Collections.EMPTY_LIST;
protected BroadcastQueue broadcastQueue = new BroadcastQueue();
DyrellC marked this conversation as resolved.
Show resolved Hide resolved

//IXI
protected String ixiDir = Defaults.IXI_DIR;
Expand Down Expand Up @@ -172,6 +175,11 @@ public String getApiHost() {
return apiHost;
}

@Override
public BroadcastQueue getBroadcastQueue() {
return broadcastQueue;
}

@JsonProperty
@Parameter(names = {"--api-host"}, description = APIConfig.Descriptions.API_HOST)
protected void setApiHost(String apiHost) {
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/com/iota/iri/conf/NetworkConfig.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.iota.iri.conf;

import com.iota.iri.network.pipeline.BroadcastQueue;

import java.util.List;

/**
Expand Down Expand Up @@ -89,6 +91,11 @@ public interface NetworkConfig extends Config {
*/
int getCacheSizeBytes();

/**
* @return The current {@link BroadcastQueue}
*/
BroadcastQueue getBroadcastQueue();

interface Descriptions {
String NEIGHBORING_SOCKET_ADDRESS = "The address to bind the TCP server socket to.";
String NEIGHBORING_SOCKET_PORT = "The TCP Receiver Port.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

import com.iota.iri.model.*;
import com.iota.iri.model.persistables.*;
import com.iota.iri.network.pipeline.BroadcastQueue;
import com.iota.iri.network.pipeline.ProcessingContext;
import com.iota.iri.network.pipeline.BroadcastPayload;
import com.iota.iri.service.snapshot.Snapshot;
import com.iota.iri.storage.Indexable;
import com.iota.iri.storage.Persistable;
Expand Down Expand Up @@ -712,7 +715,8 @@ public void setMetadata() {
: TransactionViewModel.FILLED_SLOT;
}

public static void updateSolidTransactions(Tangle tangle, Snapshot initialSnapshot, final LinkedHashSet<Hash> analyzedHashes)
public static void updateSolidTransactions(Tangle tangle, Snapshot initialSnapshot,
final LinkedHashSet<Hash> analyzedHashes, BroadcastQueue broadcastQueue)
throws Exception {
Object[] hashes = analyzedHashes.toArray();
TransactionViewModel transactionViewModel;
Expand All @@ -724,6 +728,8 @@ public static void updateSolidTransactions(Tangle tangle, Snapshot initialSnapsh
if (!transactionViewModel.isSolid()) {
transactionViewModel.updateSolid(true);
transactionViewModel.update(tangle, initialSnapshot, "solid|height");
BroadcastPayload payload = new BroadcastPayload(null,transactionViewModel);
broadcastQueue.add(new ProcessingContext(payload));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ TransactionProcessingPipeline provideTransactionProcessingPipeline(NeighborRoute
TipsViewModel tipsViewModel, LatestMilestoneTracker latestMilestoneTracker,
TransactionRequester transactionRequester) {
return new TransactionProcessingPipelineImpl(neighborRouter, configuration, txValidator, tangle,
snapshotProvider, tipsViewModel, latestMilestoneTracker, transactionRequester);
snapshotProvider, tipsViewModel, latestMilestoneTracker, transactionRequester,
configuration.getBroadcastQueue());
}

@Singleton
Expand Down
46 changes: 46 additions & 0 deletions src/main/java/com/iota/iri/network/pipeline/BroadcastQueue.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package com.iota.iri.network.pipeline;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;

/**
* A queue for transactions intended to be submitted to the {@link BroadcastStage}
* for processing
*/
public class BroadcastQueue {

/** A blocking queue to store transactions for broadcasting */
private BlockingQueue<ProcessingContext> broadcastStageQueue = new ArrayBlockingQueue<>(100);
DyrellC marked this conversation as resolved.
Show resolved Hide resolved

/** An object to be used for synchronizing calls */
private final Object broadcastSync = new Object();


/**
* Add transactions to the Broadcast Queue
* @param context Transaction context to be passed to the {@link BroadcastStage}
* @return True if added properly, False if not
*/
public boolean add(ProcessingContext context) {
synchronized (broadcastSync) {
try {
this.broadcastStageQueue.put(context);
return true;
} catch (Exception e) {
return false;
}
}

}

/**
* Getter for the current Broadcast Queue
* @return BlockingQueue of all transactions left to be broadcasted
*/
public BlockingQueue<ProcessingContext> get(){
/** Call is synchronized to ensure all pending additions have completed before sending the state */
synchronized (broadcastSync) {
return this.broadcastStageQueue;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ public class TransactionProcessingPipelineImpl implements TransactionProcessingP
private BlockingQueue<ProcessingContext> preProcessStageQueue = new ArrayBlockingQueue<>(100);
private BlockingQueue<ProcessingContext> validationStageQueue = new ArrayBlockingQueue<>(100);
private BlockingQueue<ProcessingContext> receivedStageQueue = new ArrayBlockingQueue<>(100);
private BlockingQueue<ProcessingContext> broadcastStageQueue = new ArrayBlockingQueue<>(100);
private BlockingQueue<ProcessingContext> replyStageQueue = new ArrayBlockingQueue<>(100);
private BroadcastQueue broadcastStageQueue;

/**
* Creates a {@link TransactionProcessingPipeline}.
Expand All @@ -84,7 +84,7 @@ public class TransactionProcessingPipelineImpl implements TransactionProcessingP
public TransactionProcessingPipelineImpl(NeighborRouter neighborRouter, NodeConfig config,
TransactionValidator txValidator, Tangle tangle, SnapshotProvider snapshotProvider,
TipsViewModel tipsViewModel, LatestMilestoneTracker latestMilestoneTracker,
TransactionRequester transactionRequester) {
TransactionRequester transactionRequester, BroadcastQueue broadcastStageQueue) {
FIFOCache<Long, Hash> recentlySeenBytesCache = new FIFOCache<>(config.getCacheSizeBytes());
this.preProcessStage = new PreProcessStage(recentlySeenBytesCache);
this.replyStage = new ReplyStage(neighborRouter, config, tangle, tipsViewModel, latestMilestoneTracker,
Expand All @@ -94,6 +94,7 @@ public TransactionProcessingPipelineImpl(NeighborRouter neighborRouter, NodeConf
this.receivedStage = new ReceivedStage(tangle, txValidator, snapshotProvider, transactionRequester);
this.batchedHasher = BatchedHasherFactory.create(BatchedHasherFactory.Type.BCTCURL81, 20);
this.hashingStage = new HashingStage(batchedHasher);
this.broadcastStageQueue = broadcastStageQueue;
}

@Override
Expand All @@ -103,7 +104,7 @@ public void start() {
addStage("validation", validationStageQueue, validationStage);
addStage("reply", replyStageQueue, replyStage);
addStage("received", receivedStageQueue, receivedStage);
addStage("broadcast", broadcastStageQueue, broadcastStage);
addStage("broadcast", broadcastStageQueue.get(), broadcastStage);
}

/**
Expand All @@ -118,7 +119,14 @@ private void addStage(String name, BlockingQueue<ProcessingContext> queue,
stagesThreadPool.submit(new Thread(() -> {
try {
while (!Thread.currentThread().isInterrupted()) {
ProcessingContext ctx = stage.process(queue.take());
ProcessingContext queueTake;
if(name.equals("broadcast")) {
queueTake = broadcastStageQueue.get().take();
} else{
queueTake = queue.take();
}
ProcessingContext ctx = stage.process(queueTake);

switch (ctx.getNextStage()) {
case REPLY:
replyStageQueue.put(ctx);
Expand All @@ -135,7 +143,7 @@ private void addStage(String name, BlockingQueue<ProcessingContext> queue,
receivedStageQueue.put(payload.getRight());
break;
case BROADCAST:
broadcastStageQueue.put(ctx);
broadcastStageQueue.add(ctx);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So if I understand correctly, you still add transactions that are not solid...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@galrogo Just to address this comment and subsequently issue #1512, currently transaction requests are dependent on broadcasting, so if you do not broadcast unsolid transactions, you will never send a transaction request. So it is necessary to pass on transactions before they are solid in the current framework. May be worth discussing a new method of transaction requesting from neighbours to avoid this dependency.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just broadcast random solid tips like before?

I guess moving on to the new messages that were developed for hornet will solve this problem

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC, you implemented my suggestion above?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you say before are you referring to before the refactor? Because as is, after a transaction is placed into the solidifier, the solidify stage will fetch a random solid tip and broadcast it. If the tip is not solid the pipeline goes straight to FINISH instead. As it was before it was:
Transaction -> Pre-Processing -> Hashing/Validation -> Received (store) -> Broadcast (pass transaction on before verification of solidity) -> Finish
But now it would be:
Transaction -> Pre-Processing -> Hashing/Validation -> Received (store) -> Solidify (check if solid, if so pass on to broadcast, if not, place in solidification queue and fetch random tip for broadcasting) -> Broadcast -> Finish

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DyrellC, marking this as point to discuss before merge

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

never mind, I am good

break;
case ABORT:
break;
Expand All @@ -160,7 +168,7 @@ public BlockingQueue<ProcessingContext> getReceivedStageQueue() {

@Override
public BlockingQueue<ProcessingContext> getBroadcastStageQueue() {
return broadcastStageQueue;
return broadcastStageQueue.get();
}

@Override
Expand Down
5 changes: 5 additions & 0 deletions src/test/java/com/iota/iri/TransactionValidatorTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.iota.iri.crypto.SpongeFactory;
import com.iota.iri.model.TransactionHash;
import com.iota.iri.network.TransactionRequester;
import com.iota.iri.network.pipeline.BroadcastQueue;
import com.iota.iri.service.snapshot.SnapshotProvider;
import com.iota.iri.service.snapshot.impl.SnapshotMockUtils;
import com.iota.iri.storage.Tangle;
Expand Down Expand Up @@ -42,6 +43,9 @@ public class TransactionValidatorTest {
@Mock
private static SnapshotProvider snapshotProvider;

@Mock
private static BroadcastQueue broadcastQueue;

@BeforeClass
public static void setUp() throws Exception {
dbFolder.create();
Expand All @@ -67,6 +71,7 @@ public void setUpEach() {
TransactionRequester txRequester = new TransactionRequester(tangle, snapshotProvider);
txValidator = new TransactionValidator(tangle, snapshotProvider, tipsViewModel, txRequester, new MainnetConfig());
txValidator.setMwm(false, MAINNET_MWM);
txValidator.init(broadcastQueue);
}

@Test
Expand Down
Loading