Skip to content

Commit 7f376fa

Browse files
committed
Remove peer_log.
1 parent 985dd38 commit 7f376fa

File tree

2 files changed

+2
-24
lines changed

2 files changed

+2
-24
lines changed

beacon_chain/sync/sync_dag.nim

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# at your option. This file may not be copied, modified, or distributed except according to those terms.
77
{.push raises: [].}
88

9-
import std/[sets, tables, strutils, sequtils]
9+
import std/[sets, tables, strutils]
1010
import stew/base10, chronos, chronicles, results
1111
import ../spec/[forks, block_id]
1212
import ./[sync_queue]
@@ -20,15 +20,9 @@ type
2020
parent*: SyncDagEntryRef
2121
flags*: set[DagEntryFlag]
2222

23-
BlockLogEntry* = object
24-
slot*: Slot
25-
root*: Eth2Digest
26-
parent_root*: Eth2Digest
27-
2823
PeerEntryRef*[A] = ref object
2924
peer*: A
3025
pendingRoots*: Deque[Eth2Digest]
31-
rootsLog*: seq[BlockLogEntry]
3226
maxBlocksPerRequest*: int
3327
maxSidecarsPerRequest*: int
3428
peerLoopFut*: Future[void].Raising([])
@@ -42,20 +36,6 @@ type
4236
const
4337
EmptyBlockId* = BlockId(slot: FAR_FUTURE_SLOT)
4438

45-
func toLogEntry*(blck: ref ForkedSignedBeaconBlock): BlockLogEntry =
46-
withBlck(blck[]):
47-
BlockLogEntry(
48-
slot: forkyBlck.message.slot,
49-
root: forkyBlck.root,
50-
parent_root: forkyBlck.message.parent_root)
51-
52-
func shortLog*(entry: BlockLogEntry): string =
53-
"(slot: " & $entry.slot & ", root: " & shortLog(entry.root) &
54-
", parent_root: " & shortLog(entry.parent_root) & ")"
55-
56-
func shortLog*(entries: openArray[BlockLogEntry]): string =
57-
"[" & entries.mapIt(shortLog(it)).join(",") & "]"
58-
5939
func toBlockId*(checkpoint: Checkpoint): BlockId =
6040
BlockId(root: checkpoint.root, slot: checkpoint.epoch.start_slot())
6141

beacon_chain/sync/sync_overseer2.nim

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,7 +1050,6 @@ proc doPeerUpdateRoots(
10501050
block_root = shortLog(signedBlock[].root)
10511051
# Update SyncDAG with block
10521052
overseer.updatePeer(peer.getKey(), true, signedBlock, missingSidecars)
1053-
peerEntry.rootsLog.add(signedBlock.toLogEntry())
10541053
removeRoot(signedBlock[].root)
10551054

10561055
true
@@ -1811,8 +1810,7 @@ proc startPeer(
18111810

18121811
debug "Peer current root state",
18131812
local_head = dag.head.slot,
1814-
head_distance = overseer.syncDistance(peer),
1815-
peer_log = shortLog(peerEntry.rootsLog)
1813+
head_distance = overseer.syncDistance(peer)
18161814

18171815
if overseer.finalizedDistance().get() < 4'u64:
18181816
if not(await overseer.doPeerUpdateRoots(peer)):

0 commit comments

Comments
 (0)