-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3239 from ethereum/feature/getPendingTransactions
Extends the web3-eth module with the method getPendingTransactions
- Loading branch information
Showing
4 changed files
with
133 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
var testMethod = require('./helpers/test.method.js'); | ||
|
||
var unformattedTx = { | ||
"hash":"0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b", | ||
"nonce":"0x5", | ||
"blockHash": "0x6fd9e2a26ab", | ||
"blockNumber": "0x15df", | ||
"transactionIndex": "0x1", | ||
"from":"0x407d73d8a49eeb85d32cf465507dd71d507100c1", | ||
"to":"0x85f43d8a49eeb85d32cf465507dd71d507100c1d", | ||
"value":"0x7f110", | ||
"gas": "0x7f110", | ||
"gasPrice":"0x09184e72a000", | ||
"input":"0x603880600c6000396000f30060" | ||
}; | ||
|
||
var result = [unformattedTx, unformattedTx]; | ||
|
||
var formattedTx = { | ||
"hash":"0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b", | ||
"nonce":5, | ||
"blockHash": "0x6fd9e2a26ab", | ||
"blockNumber": 5599, | ||
"transactionIndex": 1, | ||
"from":"0x407D73d8a49eeb85D32Cf465507dd71d507100c1", // checksum address | ||
"to":"0x85F43D8a49eeB85d32Cf465507DD71d507100C1d", // checksum address | ||
"value": '520464', | ||
"gas": 520464, | ||
"gasPrice": '10000000000000', | ||
"input":"0x603880600c6000396000f30060" | ||
}; | ||
|
||
var formattedResult = [formattedTx, formattedTx]; | ||
|
||
var tests = [{ | ||
args: [], | ||
formattedArgs: [], | ||
result: result, | ||
formattedResult: formattedResult, | ||
call: 'eth_pendingTransactions' | ||
}]; | ||
|
||
testMethod.runTests('eth', 'getPendingTransactions', tests); | ||
|