use of com.iota.iri.controllers.TipsViewModel in project iri by iotaledger.
the class TransactionValidatorTest method setUp.
@BeforeClass
public static void setUp() throws Exception {
dbFolder.create();
logFolder.create();
tangle = new Tangle();
tangle.addPersistenceProvider(new RocksDBPersistenceProvider(dbFolder.getRoot().getAbsolutePath(), logFolder.getRoot().getAbsolutePath(), 1000));
tangle.init();
TipsViewModel tipsViewModel = new TipsViewModel();
MessageQ messageQ = new MessageQ(0, "", 0, false);
TransactionRequester txRequester = new TransactionRequester(tangle, messageQ);
txValidator = new TransactionValidator(tangle, tipsViewModel, txRequester, messageQ);
txValidator.init(false, MAINNET_MWM, TESTNET_MWM);
}
use of com.iota.iri.controllers.TipsViewModel in project iri by iotaledger.
the class TipsManagerTest method setUp.
@BeforeClass
public static void setUp() throws Exception {
tangle = new Tangle();
dbFolder.create();
logFolder.create();
tangle.addPersistenceProvider(new RocksDBPersistenceProvider(dbFolder.getRoot().getAbsolutePath(), logFolder.getRoot().getAbsolutePath(), 1000));
tangle.init();
TipsViewModel tipsViewModel = new TipsViewModel();
MessageQ messageQ = new MessageQ(0, null, 1, false);
TransactionRequester transactionRequester = new TransactionRequester(tangle, messageQ);
TransactionValidator transactionValidator = new TransactionValidator(tangle, tipsViewModel, transactionRequester, messageQ);
Milestone milestone = new Milestone(tangle, Hash.NULL_HASH, Snapshot.initialSnapshot.clone(), transactionValidator, true, messageQ);
LedgerValidator ledgerValidator = new LedgerValidator(tangle, milestone, transactionRequester, messageQ);
tipsManager = new TipsManager(tangle, ledgerValidator, transactionValidator, tipsViewModel, milestone, 15, messageQ);
}
Aggregations