diff options
author | Dan Finlay <dan@danfinlay.com> | 2017-12-20 04:22:48 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2017-12-20 04:23:59 +0800 |
commit | 30b45c8a385e9ae4c6b78d0a7ec6929f7bad4d9a (patch) | |
tree | 378646b52c1008c6996e43f3d7308ee7d30f95a7 /app/scripts | |
parent | 10ff77477cf3163eaea5ac9485977d91bcc102c0 (diff) | |
download | tangerine-wallet-browser-30b45c8a385e9ae4c6b78d0a7ec6929f7bad4d9a.tar tangerine-wallet-browser-30b45c8a385e9ae4c6b78d0a7ec6929f7bad4d9a.tar.gz tangerine-wallet-browser-30b45c8a385e9ae4c6b78d0a7ec6929f7bad4d9a.tar.bz2 tangerine-wallet-browser-30b45c8a385e9ae4c6b78d0a7ec6929f7bad4d9a.tar.lz tangerine-wallet-browser-30b45c8a385e9ae4c6b78d0a7ec6929f7bad4d9a.tar.xz tangerine-wallet-browser-30b45c8a385e9ae4c6b78d0a7ec6929f7bad4d9a.tar.zst tangerine-wallet-browser-30b45c8a385e9ae4c6b78d0a7ec6929f7bad4d9a.zip |
Do not log whole txs in recent block controller.
Only record gas prices, because that has a current use.
Diffstat (limited to 'app/scripts')
-rw-r--r-- | app/scripts/controllers/recent-blocks.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/app/scripts/controllers/recent-blocks.js b/app/scripts/controllers/recent-blocks.js index 27f9013ff..4a906261e 100644 --- a/app/scripts/controllers/recent-blocks.js +++ b/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() |