Search in sources :

Example 1 with InitialAddressState

use of org.ethereum.core.genesis.InitialAddressState in project rskj by rsksmart.

the class BlockGenerator method generatePreMine.

private Map<RskAddress, InitialAddressState> generatePreMine(Map<byte[], BigInteger> alloc) {
    Map<RskAddress, InitialAddressState> premine = new HashMap<>();
    for (byte[] key : alloc.keySet()) {
        AccountState acctState = new AccountState(BigInteger.valueOf(0), new Coin(alloc.get(key)));
        premine.put(new RskAddress(key), new InitialAddressState(acctState, null));
    }
    return premine;
}
Also used : Coin(co.rsk.core.Coin) HashMap(java.util.HashMap) RskAddress(co.rsk.core.RskAddress) InitialAddressState(org.ethereum.core.genesis.InitialAddressState)

Aggregations

Coin (co.rsk.core.Coin)1 RskAddress (co.rsk.core.RskAddress)1 HashMap (java.util.HashMap)1 InitialAddressState (org.ethereum.core.genesis.InitialAddressState)1