Skip to content

Commit

Permalink
add beforeStateAccounts insertion behind flag
Browse files Browse the repository at this point in the history
beforeStateAccounts type fix
  • Loading branch information
S0naliThakur committed Sep 6, 2024
1 parent 8b65b81 commit ed76f41
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export interface Config {
enabled: boolean
}
newPOQReceipt: boolean
storeReceiptBeforeStates: boolean
waitingTimeForMissingTxData: number // Wait time in ms for missing tx data before collecting from other archivers
gossipToMoreArchivers: true // To gossip to more archivers in addition to adjacent archivers
randomGossipArchiversCount: 2 // Number of random archivers to gossip to
Expand Down Expand Up @@ -158,6 +159,7 @@ let config: Config = {
enabled: false,
},
newPOQReceipt: false,
storeReceiptBeforeStates: false,
waitingTimeForMissingTxData: 2000, // in ms
gossipToMoreArchivers: true,
randomGossipArchiversCount: 2,
Expand Down
2 changes: 2 additions & 0 deletions src/Data/Collector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -882,6 +882,7 @@ export const storeReceiptData = async (
receiptId: tx.txId,
timestamp: tx.timestamp,
applyTimestamp,
beforeStateAccounts: config.storeReceiptBeforeStates ? receipt.beforeStateAccounts : [],
})
if (config.dataLogWrite && ReceiptLogWriter)
ReceiptLogWriter.writeToLog(
Expand All @@ -890,6 +891,7 @@ export const storeReceiptData = async (
receiptId: tx.txId,
timestamp: tx.timestamp,
applyTimestamp,
beforeStateAccounts: config.storeReceiptBeforeStates ? receipt.beforeStateAccounts : [],
})}\n`
)
txDataList.push({ txId, timestamp })
Expand Down

0 comments on commit ed76f41

Please sign in to comment.