From 2cce4314d5e1e77ef685c8394d9197c1b1f8b6f5 Mon Sep 17 00:00:00 2001 From: aunshx Date: Fri, 27 Sep 2024 13:56:15 -0700 Subject: [PATCH] Minor changes 2 --- src/Components/Pages/Team/Ancilliary/Data/data.js | 4 ++-- .../Visualizer/Ancilliary/Computation/CompPbft.js | 14 +++++++------- .../Visualizer/Ancilliary/Computation/TransInfo.js | 1 + .../Pages/Visualizer/Graphs/PBFT/index.js | 2 +- .../Visualizer/Table/Components/SmallTable.js | 3 +-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Components/Pages/Team/Ancilliary/Data/data.js b/src/Components/Pages/Team/Ancilliary/Data/data.js index 1422913..519a560 100644 --- a/src/Components/Pages/Team/Ancilliary/Data/data.js +++ b/src/Components/Pages/Team/Ancilliary/Data/data.js @@ -2,7 +2,7 @@ export const currentTeam = [ { name: "Aunsh Bandivadekar", - title: "Architect & Developer", + title: "Dev", socials: [ "https://instagram.com/aunsh___", "https://linkedin.com/in/aunsh", @@ -13,7 +13,7 @@ export const currentTeam = [ }, { name: "Saipranav Kotamreddy", - title: "Architect & Developer", + title: "Dev", socials: { ig: "https://instagram.com/aunsh___", linkedIn: "https://instagram.com/in/aunsh", diff --git a/src/Components/Pages/Visualizer/Ancilliary/Computation/CompPbft.js b/src/Components/Pages/Visualizer/Ancilliary/Computation/CompPbft.js index ad723a1..4efedab 100644 --- a/src/Components/Pages/Visualizer/Ancilliary/Computation/CompPbft.js +++ b/src/Components/Pages/Visualizer/Ancilliary/Computation/CompPbft.js @@ -84,6 +84,13 @@ export const generateConnections = ( points.prePrepare.start.push(points.request.end[0].points[i]) } + for (let i = 1; i < yCoords.length; i++) { + yCoordToReplicas = { + ...yCoordToReplicas, + [yCoords[i]]: i, + }; + } + for (const element of points.prePrepare.start) points.prePrepare.end.push([]); for (let i = 0; i < points.prePrepare.start.length; i++) { @@ -100,13 +107,6 @@ export const generateConnections = ( } } - for (let i = 1; i < yCoords.length; i++) { - yCoordToReplicas = { - ...yCoordToReplicas, - [yCoords[i]]: i, - }; - } - // PREPARE OBJECT let xVal = points.prePrepare.end[0][0].points.x; let currentPreparePoints = new Set(); diff --git a/src/Components/Pages/Visualizer/Ancilliary/Computation/TransInfo.js b/src/Components/Pages/Visualizer/Ancilliary/Computation/TransInfo.js index 3dfc98f..1011d5e 100644 --- a/src/Components/Pages/Visualizer/Ancilliary/Computation/TransInfo.js +++ b/src/Components/Pages/Visualizer/Ancilliary/Computation/TransInfo.js @@ -95,6 +95,7 @@ export const truncData = (data, currentTransaction) => { .sort(([keyA], [keyB]) => parseInt(keyA) - parseInt(keyB)) .slice(0, 10); } + const result = {}; selectedEntries.forEach(([key, value]) => { result[key] = value; diff --git a/src/Components/Pages/Visualizer/Graphs/PBFT/index.js b/src/Components/Pages/Visualizer/Graphs/PBFT/index.js index 2174ebf..3f03b83 100644 --- a/src/Components/Pages/Visualizer/Graphs/PBFT/index.js +++ b/src/Components/Pages/Visualizer/Graphs/PBFT/index.js @@ -255,7 +255,7 @@ const Pbft = () => { points.prePrepare.start.length > 0 && points.prePrepare.start.map((start, index) => points.prePrepare.end[index].map((end, i) => { return ( - end.flag && connectionRender([start, end.points], points.prePrepare.color, pointColorMode, TRANSDURATION_NP, i * 1 + PREPREPARE_BUFFER_NP, lineGen, lineSVG, 'prepare') + end.flag && connectionRender([start, end.points], points.prePrepare.color, pointColorMode, TRANSDURATION_NP, i * 1 + PREPREPARE_BUFFER_NP, lineGen, lineSVG, 'prePrepare') ); }) ); diff --git a/src/Components/Pages/Visualizer/Table/Components/SmallTable.js b/src/Components/Pages/Visualizer/Table/Components/SmallTable.js index c9e1474..f7f00ca 100644 --- a/src/Components/Pages/Visualizer/Table/Components/SmallTable.js +++ b/src/Components/Pages/Visualizer/Table/Components/SmallTable.js @@ -93,8 +93,7 @@ const TableValues = ({ srNo, transaction, loading }) => { const SmallTable = () => { const { loading, truncatedData } = useContext(VizDataHistoryContext) - - console.log('TRUNC DATA', truncatedData) + return (