Skip to content

Commit 96637cf

Browse files
committed
Genesis test fixes
1 parent 11377f7 commit 96637cf

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

convex-core/src/main/java/convex/core/init/Init.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public class Init {
7171
/**
7272
* Number of coins issued at genesis (one million)
7373
*/
74-
private static final long GENESIS_COINS=1000000*Coin.GOLD;
74+
public static final long GENESIS_COINS=1000000*Coin.GOLD;
7575

7676
public static final AccountKey DEFAULT_GOV_KEY = AccountKey.fromHex("12EF73ee900eD1FE78A188f59bF8CedE467bAA66f5b60368aFAaA3B9521aB94d");
7777
public static final AccountKey DEFAULT_GENESIS_KEY = AccountKey.fromHex("c1d3b0104d55ddf7680181a46e93422e49e2ea9298e37794860f1ef1128427f7");

convex-core/src/test/java/convex/core/init/GenesisTest.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,16 @@
1212
public class GenesisTest {
1313

1414
@Test
15-
public static void testGenesis() {
15+
public void testGenesis() {
1616
State genesis=Init.createState(Init.DEFAULT_GOV_KEY, Init.DEFAULT_GENESIS_KEY, List.of(Init.FIRST_PEER_KEY));
17-
assertEquals("b0e44f2a645abfa539f5b96b7a0eabb0f902866feaff0f7c12d1213e02333f13",genesis.getHash().toHexString());
17+
// This changes because of updates to cvx files
18+
// assertEquals("b0e44f2a645abfa539f5b96b7a0eabb0f902866feaff0f7c12d1213e02333f13",genesis.getHash().toHexString());
19+
assertEquals("15dce0fe6903633b4ed01aa4452d7250901d5a29cbf7f2c5916c97535ee948da",genesis.getHash().toHexString());
1820

1921
assertEquals(Init.FIRST_USER_KEY,genesis.getAccount(13).getAccountKey());
2022

21-
assertEquals(Coin.MAX_SUPPLY,genesis.computeSupply());
23+
assertEquals(Init.GENESIS_COINS,genesis.computeSupply()); // 1m CVM initially in genesis
24+
assertEquals(Coin.MAX_SUPPLY,genesis.computeTotalBalance());
2225

2326
// Should be 128 reserved addresses plus two currencies and markets (USDF and GBPF)
2427
assertEquals(132,genesis.getAccounts().count());

0 commit comments

Comments
 (0)