Search in sources :

Example 21 with AgentPo

use of io.nuls.consensus.poc.storage.po.AgentPo in project nuls by nuls-io.

the class AgentStorageServiceTest method testGet.

@Test
public void testGet() {
    assertNotNull(agentStorageService);
    testSave();
    NulsDigestData hash = NulsDigestData.calcDigestData(new byte[23]);
    AgentPo agentPo = agentStorageService.get(hash);
    assertNotNull(agentPo);
    assert (Arrays.equals(agentPo.getAgentAddress(), new byte[23]));
}
Also used : NulsDigestData(io.nuls.kernel.model.NulsDigestData) AgentPo(io.nuls.consensus.poc.storage.po.AgentPo) BaseTest(io.nuls.consensus.poc.storage.BaseTest) Test(org.junit.Test)

Aggregations

AgentPo (io.nuls.consensus.poc.storage.po.AgentPo)21 NulsDigestData (io.nuls.kernel.model.NulsDigestData)8 DepositPo (io.nuls.consensus.poc.storage.po.DepositPo)7 NulsRuntimeException (io.nuls.kernel.exception.NulsRuntimeException)6 ValidateResult (io.nuls.kernel.validate.ValidateResult)6 BaseTest (io.nuls.consensus.poc.storage.BaseTest)4 NulsException (io.nuls.kernel.exception.NulsException)4 ArrayList (java.util.ArrayList)4 Test (org.junit.Test)4 Agent (io.nuls.consensus.poc.protocol.entity.Agent)3 RedPunishData (io.nuls.consensus.poc.protocol.entity.RedPunishData)3 RedPunishTransaction (io.nuls.consensus.poc.protocol.tx.RedPunishTransaction)3 StopAgentTransaction (io.nuls.consensus.poc.protocol.tx.StopAgentTransaction)3 BlockHeader (io.nuls.kernel.model.BlockHeader)3 HashSet (java.util.HashSet)3 DepositTransaction (io.nuls.consensus.poc.protocol.tx.DepositTransaction)2 Coin (io.nuls.kernel.model.Coin)2 Na (io.nuls.kernel.model.Na)2 Transaction (io.nuls.kernel.model.Transaction)2 TransactionSignature (io.nuls.kernel.script.TransactionSignature)2