internal/ethapi: rename debug getters to match spec (#25176)

Some small fixes to get the existing debug methods to conform to the spec. Mainly dropping the encoding information from the method name as it should be deduced from the debug context and allowing the method to be invoked by either block number or block hash. It also adds the method debug_getTransaction which returns the raw tx bytes by tx hash. This is pretty much equivalent to the eth_getRawTransactionByHash method.
This commit is contained in:
lightclient
2022-08-25 10:41:37 +02:00
committed by GitHub
parent 6c40aed146
commit 70e1e65b1d
2 changed files with 54 additions and 13 deletions
+9 -4
View File
@@ -224,13 +224,13 @@ web3._extend({
outputFormatter: console.log
}),
new web3._extend.Method({
name: 'getHeaderRlp',
call: 'debug_getHeaderRlp',
name: 'getRawHeader',
call: 'debug_getRawHeader',
params: 1
}),
new web3._extend.Method({
name: 'getBlockRlp',
call: 'debug_getBlockRlp',
name: 'getRawBlock',
call: 'debug_getRawBlock',
params: 1
}),
new web3._extend.Method({
@@ -238,6 +238,11 @@ web3._extend({
call: 'debug_getRawReceipts',
params: 1
}),
new web3._extend.Method({
name: 'getRawTransaction',
call: 'debug_getRawTransaction',
params: 1
}),
new web3._extend.Method({
name: 'setHead',
call: 'debug_setHead',