Search in sources :

Example 1 with AccountType

use of org.tron.protos.Protocol.AccountType in project java-tron by tronprotocol.

the class AccountCapsuleTest method init.

@BeforeClass
public static void init() {
    Args.setParam(new String[] { "-d", dbPath, "-w" }, Configuration.getByPath(Constant.TEST_CONF));
    ByteString accountName = ByteString.copyFrom(AccountCapsuleTest.randomBytes(16));
    ByteString address = ByteString.copyFrom(AccountCapsuleTest.randomBytes(32));
    AccountType accountType = AccountType.forNumber(1);
    accountCapsuleTest = new AccountCapsule(accountName, address, accountType);
    byte[] accountByte = accountCapsuleTest.getData();
    accountCapsule = new AccountCapsule(accountByte);
    accountCapsuleTest.setBalance(1111L);
}
Also used : ByteString(com.google.protobuf.ByteString) AccountType(org.tron.protos.Protocol.AccountType) BeforeClass(org.junit.BeforeClass)

Aggregations

ByteString (com.google.protobuf.ByteString)1 BeforeClass (org.junit.BeforeClass)1 AccountType (org.tron.protos.Protocol.AccountType)1