mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Do not log whole txs in recent block controller.
Only record gas prices, because that has a current use.
This commit is contained in:
parent
10ff77477c
commit
30b45c8a38
@ -23,8 +23,15 @@ class RecentBlocksController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
processBlock (newBlock) {
|
processBlock (newBlock) {
|
||||||
|
const block = extend(newBlock, {
|
||||||
|
gasPrices: newBlock.transactions.map((tx) => {
|
||||||
|
return tx.gasPrice
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
delete block.transactions
|
||||||
|
|
||||||
const state = this.store.getState()
|
const state = this.store.getState()
|
||||||
state.recentBlocks.push(newBlock)
|
state.recentBlocks.push(block)
|
||||||
|
|
||||||
while (state.recentBlocks.length > this.historyLength) {
|
while (state.recentBlocks.length > this.historyLength) {
|
||||||
state.recentBlocks.shift()
|
state.recentBlocks.shift()
|
||||||
|
Loading…
Reference in New Issue
Block a user