From 14d7c6b51b477ab40320164b96d26ac0d778b211 Mon Sep 17 00:00:00 2001 From: cgewecke Date: Mon, 6 Nov 2017 11:34:25 -0800 Subject: [PATCH] Fix gas test, bump to testrpc-sc 6.0.4 --- package-lock.json | 20 ++++++++++---------- package.json | 2 +- test/cli/block-gas-limit.js | 4 +++- test/sources/cli/Expensive.sol | 5 ++--- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9e597e3..6bb4e7c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1902,7 +1902,7 @@ "create-hash": "1.1.3", "keccakjs": "0.2.1", "rlp": "2.0.0", - "secp256k1": "3.3.0" + "secp256k1": "3.3.1" } } } @@ -1929,9 +1929,9 @@ } }, "ethereumjs-testrpc-sc": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/ethereumjs-testrpc-sc/-/ethereumjs-testrpc-sc-6.0.3.tgz", - "integrity": "sha512-TAKhGUnG1KSQ6ofGWzjduVpOrBCZbELsHzw46dpMyE3kVEcXCHT6nlVRj110shZvBfNmXocmxVqRWv1bEuhTFA==", + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/ethereumjs-testrpc-sc/-/ethereumjs-testrpc-sc-6.0.4.tgz", + "integrity": "sha512-AIW/+tzBMHIHmKjgNzOpZgncp6vgqZhNGIliZjrzrpNnqpOWtMnwlDr2/O3FOZP0RAL777pfPZaLMNAtfng4fA==", "requires": { "webpack": "3.8.1" } @@ -1959,7 +1959,7 @@ "ethjs-util": "0.1.4", "keccak": "1.3.0", "rlp": "2.0.0", - "secp256k1": "3.3.0" + "secp256k1": "3.3.1" } }, "ethereumjs-vm": { @@ -1995,7 +1995,7 @@ "create-hash": "1.1.3", "keccakjs": "0.2.1", "rlp": "2.0.0", - "secp256k1": "3.3.0" + "secp256k1": "3.3.1" } } } @@ -4234,7 +4234,7 @@ "create-hash": "1.1.3", "keccakjs": "0.2.1", "rlp": "2.0.0", - "secp256k1": "3.3.0" + "secp256k1": "3.3.1" } } } @@ -5319,9 +5319,9 @@ "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" }, "secp256k1": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.3.0.tgz", - "integrity": "sha512-CbrQoeGG5V0kQ1ohEMGI+J7oKerapLTpivLICBaXR0R4HyQcN3kM9itLsV5fdpV1UR1bD14tOkJ1xughmlDIiQ==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.3.1.tgz", + "integrity": "sha512-lygjgfjzjBHblEDDkppUF5KK1EeVk6P/Dv2MsJZpYIR3vW5TKFRexOFkf0hHy9J5YxEpjQZ6x98Y3XQpMQO/vA==", "dev": true, "requires": { "bindings": "1.3.0", diff --git a/package.json b/package.json index 7cd614c..2748bb7 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "license": "ISC", "dependencies": { "death": "^1.1.0", - "ethereumjs-testrpc-sc": "6.0.3", + "ethereumjs-testrpc-sc": "6.0.4", "istanbul": "^0.4.5", "keccakjs": "^0.2.1", "req-cwd": "^1.0.1", diff --git a/test/cli/block-gas-limit.js b/test/cli/block-gas-limit.js index 795933a..f36e328 100644 --- a/test/cli/block-gas-limit.js +++ b/test/cli/block-gas-limit.js @@ -3,5 +3,7 @@ const Expensive = artifacts.require('./Expensive.sol'); contract('Expensive', () => { - it('should deploy', () => Expensive.deployed()); + it('should deploy', async () => { + const instance = await Expensive.new() + }); }); diff --git a/test/sources/cli/Expensive.sol b/test/sources/cli/Expensive.sol index 410e694..310010d 100644 --- a/test/sources/cli/Expensive.sol +++ b/test/sources/cli/Expensive.sol @@ -1,14 +1,13 @@ // Cost to deploy Expensive: 0x4e042f // Block gas limit is: 0x47e7c4 -// Should throw out of gas on unmodified truffle +// Should throw out of gas on unmodified truffle // Should pass solcover truffle pragma solidity ^0.4.2; contract Expensive { mapping (uint => address) map; - function Expensive(){ - for(uint i = 0; i < 250; i++ ){ + for(uint i = 0; i < 1000; i++ ){ map[i] = address(this); } }