From ffd0c596d2ca29a910443b1d09a56db83d8d80e6 Mon Sep 17 00:00:00 2001 From: Michael Taylor Date: Thu, 26 Sep 2024 16:01:08 -0400 Subject: [PATCH] feat: add public key to server coin --- src/blockchain/ServerCoin.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/blockchain/ServerCoin.ts b/src/blockchain/ServerCoin.ts index 016de0d..04f8495 100644 --- a/src/blockchain/ServerCoin.ts +++ b/src/blockchain/ServerCoin.ts @@ -55,7 +55,7 @@ export class ServerCoin { publicSyntheticKey, serverCoinCreationCoins, epochBasedHint, - [peerIp], + [peerIp, publicSyntheticKey.toString("hex")], BigInt(serverCoinCollateral), BigInt(1000000) ); @@ -223,6 +223,10 @@ export class ServerCoin { for (const coinState of filteredCoinStates) { const serverCoin = await peer.fetchServerCoin(coinState, maxClvmCost); const peerUrl = serverCoin.memoUrls[0]; + // The second memo URL is the public key + // We will utilize this for future features + const publicKey = serverCoin.memoUrls[1]; + if (!blacklist.includes(peerUrl)) { serverCoinPeers.add(peerUrl); }