Do not log whole txs in recent block controller.

Only record gas prices, because that has a current use.
feature/default_network_editable
Dan Finlay 7 years ago
parent 10ff77477c
commit 30b45c8a38
  1. 9
      app/scripts/controllers/recent-blocks.js

@ -23,8 +23,15 @@ class RecentBlocksController {
}
processBlock (newBlock) {
const block = extend(newBlock, {
gasPrices: newBlock.transactions.map((tx) => {
return tx.gasPrice
}),
})
delete block.transactions
const state = this.store.getState()
state.recentBlocks.push(newBlock)
state.recentBlocks.push(block)
while (state.recentBlocks.length > this.historyLength) {
state.recentBlocks.shift()

Loading…
Cancel
Save