Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class of 24 - 7909 - Democracy 2 group #197

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Last minute changes
Quinten Van Opstal committed Jun 27, 2024
commit 68eee5bb0a5fef083f7f08a67af406ff74244b1f
Original file line number Diff line number Diff line change
@@ -396,7 +396,7 @@ open class CoinCommunity constructor(
?: throw IllegalStateException("Most recent DAO block not found")
val peerPK: ArrayList<String> = ArrayList<String>()
val blockData = SWJoinBlockTransactionData(mostRecentWalletBlock.transaction).getData()
for (swParticipantPk in blockData.SW_BITCOIN_PKS) {
for (swParticipantPk in blockData.SW_TRUSTCHAIN_PKS) {
peerPK.add(swParticipantPk)
}
return peerPK
@@ -419,7 +419,8 @@ open class CoinCommunity constructor(
val higherPeers = ArrayList<Peer>()

for (p in this.getPeers()) {
if (peerPK.contains(p.publicKey.keyToBin().toHex()) && p.address.hashCode() > this.myPeer.address.hashCode()) {
if (peerPK.contains(p.publicKey.keyToBin().toHex()) &&
p.address.hashCode() > this.myPeer.address.hashCode()) {
higherPeers.add(p)
}
}