Search in sources :

Example 6 with EventAccountSet

use of com.jd.blockchain.ledger.core.EventAccountSet in project jdchain-core by blockchain-jd-com.

the class LedgerQueryController method getUserEventAccountTotalCount.

@RequestMapping(method = RequestMethod.GET, path = GET_TOTAL_EVENT_ACCOUNT_COUNT)
@Override
public long getUserEventAccountTotalCount(@PathVariable(name = "ledgerHash") HashDigest ledgerHash) {
    LedgerQuery ledger = ledgerService.getLedger(ledgerHash);
    EventAccountSet eventAccountSet = ledger.getEventAccountSet(ledger.getLatestBlock());
    return eventAccountSet.getTotal();
}
Also used : LedgerQuery(com.jd.blockchain.ledger.core.LedgerQuery) EventAccountSet(com.jd.blockchain.ledger.core.EventAccountSet) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

EventAccountSet (com.jd.blockchain.ledger.core.EventAccountSet)6 LedgerQuery (com.jd.blockchain.ledger.core.LedgerQuery)4 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)4 BlockchainIdentity (com.jd.blockchain.ledger.BlockchainIdentity)3 QueryArgs (utils.query.QueryArgs)3 EventPublishingAccount (com.jd.blockchain.ledger.core.EventPublishingAccount)1