Search in sources :

Example 1 with BondedRoleProposal

use of bisq.core.dao.governance.proposal.role.BondedRoleProposal in project bisq-core by bisq-network.

the class VoteResultService method applyBondedRole.

private void applyBondedRole(Set<EvaluatedProposal> acceptedEvaluatedProposals, int chainHeight) {
    acceptedEvaluatedProposals.forEach(evaluatedProposal -> {
        if (evaluatedProposal.getProposal() instanceof BondedRoleProposal) {
            BondedRoleProposal bondedRoleProposal = (BondedRoleProposal) evaluatedProposal.getProposal();
            BondedRole bondedRole = bondedRoleProposal.getBondedRole();
            bondedRolesService.addAcceptedBondedRole(bondedRole);
            StringBuilder sb = new StringBuilder();
            sb.append("\n################################################################################\n");
            sb.append("We added a bonded role. ProposalTxId=").append(bondedRoleProposal.getTxId()).append("\nfor bondedRoleProposal with UID ").append(bondedRoleProposal.getTxId()).append("\nBondedRole: ").append(bondedRole.getDisplayString()).append("\n################################################################################\n");
            log.info(sb.toString());
        }
    });
}
Also used : BondedRoleProposal(bisq.core.dao.governance.proposal.role.BondedRoleProposal) BondedRole(bisq.core.dao.governance.role.BondedRole)

Aggregations

BondedRoleProposal (bisq.core.dao.governance.proposal.role.BondedRoleProposal)1 BondedRole (bisq.core.dao.governance.role.BondedRole)1