mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 01:41:11 +01:00
Fix bug with using wrong collection which held only one bond per hash
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
This commit is contained in:
parent
039d778eca
commit
7b85bc5876
@ -99,7 +99,7 @@ public class BondedReputationRepository extends BondRepository<BondedReputation,
|
||||
bonds.setAll(bondByUidMap.values());
|
||||
}
|
||||
|
||||
private Stream<BondedReputation> getBondedReputationStream() {
|
||||
public Stream<BondedReputation> getBondedReputationStream() {
|
||||
return getLockupTxOutputsForBondedReputation()
|
||||
.map(lockupTxOutput -> {
|
||||
String lockupTxId = lockupTxOutput.getTxId();
|
||||
|
@ -17,6 +17,7 @@
|
||||
|
||||
package bisq.restapi.endpoints;
|
||||
|
||||
import bisq.core.dao.governance.bond.reputation.BondedReputation;
|
||||
import bisq.core.dao.governance.bond.reputation.BondedReputationRepository;
|
||||
import bisq.core.dao.state.DaoStateService;
|
||||
import bisq.core.dao.state.model.blockchain.Tx;
|
||||
@ -80,7 +81,8 @@ public class BondedReputationApi {
|
||||
@PathParam("block-height")
|
||||
int fromBlockHeight) {
|
||||
// We only consider lock time with at least 50 000 blocks as valid
|
||||
List<BondedReputationDto> result = bondedReputationRepository.getActiveBonds().stream()
|
||||
List<BondedReputationDto> result = bondedReputationRepository.getBondedReputationStream()
|
||||
.filter(BondedReputation::isActive)
|
||||
.filter(bondedReputation -> bondedReputation.getLockTime() >= 50_000)
|
||||
.map(bondedReputation -> {
|
||||
Optional<Tx> optionalTx = daoStateService.getTx(bondedReputation.getLockupTxId());
|
||||
|
Loading…
Reference in New Issue
Block a user