Search in sources :

Example 1 with ConfiscateBond

use of bisq.core.dao.state.governance.ConfiscateBond in project bisq-core by bisq-network.

the class VoteResultService method applyConfiscateBond.

private void applyConfiscateBond(Set<EvaluatedProposal> acceptedEvaluatedProposals, int chainHeight) {
    acceptedEvaluatedProposals.forEach(evaluatedProposal -> {
        if (evaluatedProposal.getProposal() instanceof ConfiscateBondProposal) {
            ConfiscateBondProposal confiscateBondProposal = (ConfiscateBondProposal) evaluatedProposal.getProposal();
            bsqStateService.confiscateBond(new ConfiscateBond(confiscateBondProposal.getHash()));
            StringBuilder sb = new StringBuilder();
            sb.append("\n################################################################################\n");
            sb.append("We confiscated  bond. ProposalTxId=").append(confiscateBondProposal.getTxId()).append("\nfor confiscateBondProposal with UID ").append(confiscateBondProposal.getTxId()).append("\nHashOfBondId: ").append(Utilities.encodeToHex(confiscateBondProposal.getHash())).append("\n################################################################################\n");
            log.info(sb.toString());
        }
    });
}
Also used : ConfiscateBondProposal(bisq.core.dao.governance.proposal.confiscatebond.ConfiscateBondProposal) ConfiscateBond(bisq.core.dao.state.governance.ConfiscateBond)

Aggregations

ConfiscateBondProposal (bisq.core.dao.governance.proposal.confiscatebond.ConfiscateBondProposal)1 ConfiscateBond (bisq.core.dao.state.governance.ConfiscateBond)1