Skip to content

Commit

Permalink
Additional genesis tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mikera committed Dec 28, 2024
1 parent 0493b41 commit 2459826
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions convex-core/src/test/java/convex/core/init/GenesisTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import org.junit.jupiter.api.Test;

import convex.core.Coin;
import convex.core.cvm.State;

public class GenesisTest {
Expand All @@ -14,5 +15,12 @@ public class GenesisTest {
public static void testGenesis() {
State genesis=Init.createState(Init.DEFAULT_GOV_KEY, Init.DEFAULT_GENESIS_KEY, List.of(Init.FIRST_PEER_KEY));
assertEquals("b0e44f2a645abfa539f5b96b7a0eabb0f902866feaff0f7c12d1213e02333f13",genesis.getHash().toHexString());

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

assertEquals(Coin.MAX_SUPPLY,genesis.computeSupply());

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

0 comments on commit 2459826

Please sign in to comment.