eth, internal, les: add getHeaderBy* APIs (#19669)

* eth, interal, les: add getHeaderBy* APIs

* internal: address the comment

* eth, internal, les: getHeader nits, missing TD, console callable
This commit is contained in:
gary rong
2019-07-23 21:52:24 +08:00
committed by Péter Szilágyi
parent 57d9c93dcd
commit 530f78e22d
5 changed files with 126 additions and 55 deletions

View File

@ -483,6 +483,26 @@ web3._extend({
params: 1,
inputFormatter: [web3._extend.formatters.inputTransactionFormatter]
}),
new web3._extend.Method({
name: 'getHeaderByNumber',
call: 'eth_getHeaderByNumber',
params: 1
}),
new web3._extend.Method({
name: 'getHeaderByHash',
call: 'eth_getHeaderByHash',
params: 1
}),
new web3._extend.Method({
name: 'getBlockByNumber',
call: 'eth_getBlockByNumber',
params: 2
}),
new web3._extend.Method({
name: 'getBlockByHash',
call: 'eth_getBlockByHash',
params: 2
}),
new web3._extend.Method({
name: 'getRawTransaction',
call: 'eth_getRawTransactionByHash',
@ -765,7 +785,7 @@ web3._extend({
const LESJs = `
web3._extend({
property: 'les',
methods:
methods:
[
new web3._extend.Method({
name: 'getCheckpoint',
@ -773,7 +793,7 @@ web3._extend({
params: 1
}),
],
properties:
properties:
[
new web3._extend.Property({
name: 'latestCheckpoint',