forked from nordicenergy/guardian-proof-of-stake-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFakeForgingTest.java
48 lines (40 loc) · 1.42 KB
/
FakeForgingTest.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* Copyright © 2013-2016 The Nxt Core Developers.
* Copyright © 2016-2019 Jelurida IP B.V.
*
* See the LICENSE.txt file at the top-level directory of this distribution
* for licensing information.
*
* Unless otherwise agreed in a custom licensing agreement with Jelurida B.V.,
* no part of this software, including this file, may be copied, modified,
* propagated, or distributed except according to the terms contained in the
* LICENSE.txt file.
*
* Removal or modification of this copyright notice is prohibited.
*
*/
package nxt;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import java.util.Properties;
public class FakeForgingTest extends AbstractForgingTest {
@Before
public void init() {
Properties properties = AbstractForgingTest.newTestProperties();
properties.setProperty("nxt.disableGenerateBlocksThread", "false");
properties.setProperty("nxt.enableFakeForging", "true");
properties.setProperty("nxt.timeMultiplier", "1");
AbstractForgingTest.init(properties);
Assert.assertTrue("nxt.fakeForgingPublicKey must be defined in nxt.properties", Nxt.getStringProperty("nxt.fakeForgingPublicKey") != null);
}
@Test
public void fakeForgingTest() {
forgeTo(startHeight + 10, testForgingSecretPhrase);
}
@After
public void destroy() {
AbstractForgingTest.shutdown();
}
}