web3.eth.getBlockTransactionCount accepts pending/latest/earliest params
This commit is contained in:
parent
94429fffdd
commit
e2990ae77e
|
@ -1687,7 +1687,7 @@ var getBlockTransactionCount = new Method({
|
||||||
name: 'getBlockTransactionCount',
|
name: 'getBlockTransactionCount',
|
||||||
call: getBlockTransactionCountCall,
|
call: getBlockTransactionCountCall,
|
||||||
params: 1,
|
params: 1,
|
||||||
inputFormatter: [utils.toHex],
|
inputFormatter: [formatters.inputBlockNumberFormatter],
|
||||||
outputFormatter: utils.toDecimal
|
outputFormatter: utils.toDecimal
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1695,7 +1695,7 @@ var getBlockUncleCount = new Method({
|
||||||
name: 'getBlockUncleCount',
|
name: 'getBlockUncleCount',
|
||||||
call: uncleCountCall,
|
call: uncleCountCall,
|
||||||
params: 1,
|
params: 1,
|
||||||
inputFormatter: [utils.toHex],
|
inputFormatter: [formatters.inputBlockNumberFormatter],
|
||||||
outputFormatter: utils.toDecimal
|
outputFormatter: utils.toDecimal
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1687,7 +1687,7 @@ var getBlockTransactionCount = new Method({
|
||||||
name: 'getBlockTransactionCount',
|
name: 'getBlockTransactionCount',
|
||||||
call: getBlockTransactionCountCall,
|
call: getBlockTransactionCountCall,
|
||||||
params: 1,
|
params: 1,
|
||||||
inputFormatter: [utils.toHex],
|
inputFormatter: [formatters.inputBlockNumberFormatter],
|
||||||
outputFormatter: utils.toDecimal
|
outputFormatter: utils.toDecimal
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1695,7 +1695,7 @@ var getBlockUncleCount = new Method({
|
||||||
name: 'getBlockUncleCount',
|
name: 'getBlockUncleCount',
|
||||||
call: uncleCountCall,
|
call: uncleCountCall,
|
||||||
params: 1,
|
params: 1,
|
||||||
inputFormatter: [utils.toHex],
|
inputFormatter: [formatters.inputBlockNumberFormatter],
|
||||||
outputFormatter: utils.toDecimal
|
outputFormatter: utils.toDecimal
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -125,7 +125,7 @@ var getBlockTransactionCount = new Method({
|
||||||
name: 'getBlockTransactionCount',
|
name: 'getBlockTransactionCount',
|
||||||
call: getBlockTransactionCountCall,
|
call: getBlockTransactionCountCall,
|
||||||
params: 1,
|
params: 1,
|
||||||
inputFormatter: [utils.toHex],
|
inputFormatter: [formatters.inputBlockNumberFormatter],
|
||||||
outputFormatter: utils.toDecimal
|
outputFormatter: utils.toDecimal
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ var getBlockUncleCount = new Method({
|
||||||
name: 'getBlockUncleCount',
|
name: 'getBlockUncleCount',
|
||||||
call: uncleCountCall,
|
call: uncleCountCall,
|
||||||
params: 1,
|
params: 1,
|
||||||
inputFormatter: [utils.toHex],
|
inputFormatter: [formatters.inputBlockNumberFormatter],
|
||||||
outputFormatter: utils.toDecimal
|
outputFormatter: utils.toDecimal
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,12 @@ var tests = [{
|
||||||
result: '0xb',
|
result: '0xb',
|
||||||
formattedResult: 11,
|
formattedResult: 11,
|
||||||
call: 'eth_getBlockTransactionCountByNumber'
|
call: 'eth_getBlockTransactionCountByNumber'
|
||||||
|
},{
|
||||||
|
args: ['pending'],
|
||||||
|
formattedArgs: ['pending'],
|
||||||
|
result: '0xb',
|
||||||
|
formattedResult: 11,
|
||||||
|
call: 'eth_getBlockTransactionCountByNumber'
|
||||||
}];
|
}];
|
||||||
|
|
||||||
testMethod.runTests('eth', method, tests);
|
testMethod.runTests('eth', method, tests);
|
||||||
|
|
|
@ -16,6 +16,12 @@ var tests = [{
|
||||||
result: '0xb',
|
result: '0xb',
|
||||||
formattedResult: 11,
|
formattedResult: 11,
|
||||||
call: 'eth_getUncleCountByBlockNumber'
|
call: 'eth_getUncleCountByBlockNumber'
|
||||||
|
},{
|
||||||
|
args: ['pending'],
|
||||||
|
formattedArgs: ['pending'],
|
||||||
|
result: '0xb',
|
||||||
|
formattedResult: 11,
|
||||||
|
call: 'eth_getUncleCountByBlockNumber'
|
||||||
}];
|
}];
|
||||||
|
|
||||||
testMethod.runTests('eth', method, tests);
|
testMethod.runTests('eth', method, tests);
|
||||||
|
|
Loading…
Reference in New Issue