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

Remove EpochRecord getContent #2828

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions fluffy/network/history/history_network.nim
Original file line number Diff line number Diff line change
Expand Up @@ -391,20 +391,6 @@ proc getContent(
else:
Opt.some(res.get())

proc getContent(
n: HistoryNetwork,
T: type EpochRecord,
contentKey: ContentKeyByteList,
contentId: ContentId,
): Opt[T] =
let localContent = n.portalProtocol.getLocalContent(contentKey, contentId).valueOr:
return Opt.none(T)

try:
Opt.some(SSZ.decode(localContent, T))
except SerializationError:
raiseAssert("Stored data should always be serialized correctly")

## Public API to get the history network specific types, either from database
## or through a lookup on the Portal Network

Expand Down
6 changes: 3 additions & 3 deletions fluffy/tools/portal_bridge/portal_bridge_history.nim
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import
results,
stew/byteutils,
eth/common/keys,
eth/common/[base, headers_rlp, blocks_rlp],
eth/common/[base, headers_rlp, blocks_rlp, receipts],
eth/p2p/discoveryv5/random2,
../../../nimbus/beacon/web3_eth_conv,
../../../hive_integration/nodocker/engine/engine_client,
Expand Down Expand Up @@ -79,9 +79,9 @@ func asReceipt(receiptObject: ReceiptObject): Result[Receipt, string] =
var logs: seq[Log]
if receiptObject.logs.len > 0:
for log in receiptObject.logs:
var topics: seq[Topic]
var topics: seq[receipts.Topic]
for topic in log.topics:
topics.add(Topic(topic))
topics.add(topic)

logs.add(Log(address: log.address, data: log.data, topics: topics))

Expand Down
Loading