use of org.aion.base.type.Address in project aion by aionnetwork.
the class AionTransactionTest method testClone.
@Test
public void testClone() {
byte[] nonce = RandomUtils.nextBytes(16);
Address to = Address.wrap(RandomUtils.nextBytes(32));
byte[] value = RandomUtils.nextBytes(16);
byte[] data = RandomUtils.nextBytes(64);
long nrg = RandomUtils.nextLong(0, Long.MAX_VALUE);
long nrgPrice = RandomUtils.nextLong(0, Long.MAX_VALUE);
byte type = 1;
AionTransaction tx = new AionTransaction(nonce, to, value, data, nrg, nrgPrice, type);
tx.sign(ECKeyFac.inst().create());
AionTransaction tx2 = tx.clone();
assertTransactionEquals(tx, tx2);
}
Aggregations