Skip to content

Commit

Permalink
Merge pull request #173 from ethereum/failing_develop
Browse files Browse the repository at this point in the history
Fixed tests
  • Loading branch information
debris committed Apr 20, 2015
2 parents c06d75b + a827076 commit cdf02ec
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 26 deletions.
2 changes: 1 addition & 1 deletion dist/web3-light.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/web3-light.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/web3-light.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/web3.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/web3.js.map

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions dist/web3.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/web3/formatters.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ var inputTransactionFormatter = function (options){
var outputTransactionFormatter = function (tx){
tx.blockNumber = utils.toDecimal(tx.blockNumber);
tx.transactionIndex = utils.toDecimal(tx.transactionIndex);
tx.nonce = utils.toDecimal(tx.nonce);
tx.gas = utils.toDecimal(tx.gas);
tx.gasPrice = utils.toBigNumber(tx.gasPrice);
tx.value = utils.toBigNumber(tx.value);
Expand All @@ -113,7 +114,6 @@ var outputBlockFormatter = function(block) {
block.timestamp = utils.toDecimal(block.timestamp);
block.number = utils.toDecimal(block.number);

block.minGasPrice = utils.toBigNumber(block.minGasPrice);
block.difficulty = utils.toBigNumber(block.difficulty);
block.totalDifficulty = utils.toBigNumber(block.totalDifficulty);

Expand Down
2 changes: 0 additions & 2 deletions test/formatters.outputBlockFormatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ describe('formatters', function () {
difficulty: '0x3e8',
totalDifficulty: '0x3e8',
number: '0x3e8',
minGasPrice: '0x3e8',
gasLimit: '0x3e8',
gasUsed: '0x3e8',
timestamp: '0x3e8',
Expand All @@ -34,7 +33,6 @@ describe('formatters', function () {
difficulty: new BigNumber(1000),
totalDifficulty: new BigNumber(1000),
number: 1000,
minGasPrice: new BigNumber(1000),
gasLimit: 1000,
gasUsed: 1000,
timestamp: 1000,
Expand Down
2 changes: 2 additions & 0 deletions test/formatters.outputTransactionFormatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ describe('formatters', function () {
value: '0x3e8',
gas: '0x3e8',
gasPrice: '0x3e8',
nonce: '0xb',
transactionIndex: '0x1',
blockNumber: '0x3e8',
blockHash: '0x34234bf23bf4234'
Expand All @@ -23,6 +24,7 @@ describe('formatters', function () {
value: new BigNumber(1000),
gas: 1000,
gasPrice: new BigNumber(1000),
nonce: 11,
blockNumber: 1000,
blockHash: '0x34234bf23bf4234',
transactionIndex: 1
Expand Down
8 changes: 2 additions & 6 deletions test/web3.eth.getBlock.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ var blockResult = {
"size": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"minGasPrice": "0x9f759",
"gasUsed": "0x9f759",
"timestamp": "0x54e34e8e",
"transactions": ['0x460cfb8472af2c5fd05b5a2','0x460cfb8472af2c5fd05b5a2'],
Expand All @@ -40,7 +39,6 @@ var formattedBlockResult = {
"size": 163591,
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": 653145,
"minGasPrice": new BigNumber(653145),
"gasUsed": 653145,
"timestamp": 1424182926,
"transactions": ['0x460cfb8472af2c5fd05b5a2','0x460cfb8472af2c5fd05b5a2'],
Expand All @@ -61,13 +59,12 @@ var blockResultWithTx = {
"size": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"minGasPrice": "0x9f759",
"gasUsed": "0x9f759",
"timestamp": "0x54e34e8e",
"transactions": [{
"status": "mined",
"hash":"0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b",
"nonce":"0x",
"nonce":"0x2",
"blockHash": "0x6fd9e2a26ab",
"blockNumber": "0x15df",
"transactionIndex": "0x1",
Expand Down Expand Up @@ -95,13 +92,12 @@ var formattedBlockResultWithTx = {
"size": 163591,
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": 653145,
"minGasPrice": new BigNumber(653145),
"gasUsed": 653145,
"timestamp": 1424182926,
"transactions": [{
"status": "mined",
"hash":"0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b",
"nonce":"0x",
"nonce": 2,
"blockHash": "0x6fd9e2a26ab",
"blockNumber": 5599,
"transactionIndex": 1,
Expand Down
4 changes: 2 additions & 2 deletions test/web3.eth.getTransaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var method = 'getTransaction';
var txResult = {
"status": "mined",
"hash":"0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b",
"nonce":"0x",
"nonce":"0x5",
"blockHash": "0x6fd9e2a26ab",
"blockNumber": "0x15df",
"transactionIndex": "0x1",
Expand All @@ -22,7 +22,7 @@ var txResult = {
var formattedTxResult = {
"status": "mined",
"hash":"0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b",
"nonce":"0x",
"nonce":5,
"blockHash": "0x6fd9e2a26ab",
"blockNumber": 5599,
"transactionIndex": 1,
Expand Down
4 changes: 2 additions & 2 deletions test/web3.eth.getTransactionFromBlock.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var method = 'getTransactionFromBlock';
var txResult = {
"status": "mined",
"hash":"0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b",
"nonce":"0x",
"nonce":"0xb",
"blockHash": "0x6fd9e2a26ab",
"blockNumber": "0x15df",
"transactionIndex": "0x1",
Expand All @@ -22,7 +22,7 @@ var txResult = {
var formattedTxResult = {
"status": "mined",
"hash":"0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b",
"nonce":"0x",
"nonce":11,
"blockHash": "0x6fd9e2a26ab",
"blockNumber": 5599,
"transactionIndex": 1,
Expand Down
8 changes: 2 additions & 6 deletions test/web3.eth.getUncle.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ var blockResult = {
"size": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"minGasPrice": "0x9f759",
"gasUsed": "0x9f759",
"timestamp": "0x54e34e8e",
"transactions": ['0x460cfb8472af2c5fd05b5a2','0x460cfb8472af2c5fd05b5a2'],
Expand All @@ -41,7 +40,6 @@ var formattedBlockResult = {
"size": 163591,
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": 653145,
"minGasPrice": new BigNumber(653145),
"gasUsed": 653145,
"timestamp": 1424182926,
"transactions": ['0x460cfb8472af2c5fd05b5a2','0x460cfb8472af2c5fd05b5a2'],
Expand All @@ -62,13 +60,12 @@ var blockResultWithTx = {
"size": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"minGasPrice": "0x9f759",
"gasUsed": "0x9f759",
"timestamp": "0x54e34e8e",
"transactions": [{
"status": "mined",
"hash":"0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b",
"nonce":"0x",
"nonce":"0x2",
"blockHash": "0x6fd9e2a26ab",
"blockNumber": "0x15df",
"transactionIndex": "0x1",
Expand Down Expand Up @@ -96,13 +93,12 @@ var formattedBlockResultWithTx = {
"size": 163591,
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": 653145,
"minGasPrice": new BigNumber(653145),
"gasUsed": 653145,
"timestamp": 1424182926,
"transactions": [{
"status": "mined",
"hash":"0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b",
"nonce":"0x",
"nonce": 2,
"blockHash": "0x6fd9e2a26ab",
"blockNumber": 5599,
"transactionIndex": 1,
Expand Down

0 comments on commit cdf02ec

Please sign in to comment.