Changeset View
Changeset View
Standalone View
Standalone View
test/lint/check-rpc-mappings.py
#!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
# Copyright (c) 2017 The Bitcoin Core developers | # Copyright (c) 2017 The Bitcoin Core developers | ||||
# Distributed under the MIT software license, see the accompanying | # Distributed under the MIT software license, see the accompanying | ||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | # file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
"""Check RPC argument consistency.""" | """Check RPC argument consistency.""" | ||||
from collections import defaultdict | from collections import defaultdict | ||||
import os | import os | ||||
import re | import re | ||||
import sys | import sys | ||||
# Source files (relative to root) to scan for dispatch tables | # Source files (relative to root) to scan for dispatch tables | ||||
SOURCES = [ | SOURCES = [ | ||||
"src/rpc/server.cpp", | "src/rpc/abc.cpp", | ||||
"src/rpc/blockchain.cpp", | "src/rpc/blockchain.cpp", | ||||
"src/rpc/mining.cpp", | "src/rpc/mining.cpp", | ||||
"src/rpc/misc.cpp", | "src/rpc/misc.cpp", | ||||
"src/rpc/net.cpp", | "src/rpc/net.cpp", | ||||
"src/rpc/rawtransaction.cpp", | "src/rpc/rawtransaction.cpp", | ||||
"src/rpc/server.cpp", | |||||
"src/wallet/rpcdump.cpp", | "src/wallet/rpcdump.cpp", | ||||
"src/wallet/rpcwallet.cpp", | "src/wallet/rpcwallet.cpp", | ||||
] | ] | ||||
# Source file (relative to root) containing conversion mapping | # Source file (relative to root) containing conversion mapping | ||||
SOURCE_CLIENT = 'src/rpc/client.cpp' | SOURCE_CLIENT = 'src/rpc/client.cpp' | ||||
# Argument names that should be ignored in consistency checks | # Argument names that should be ignored in consistency checks | ||||
IGNORE_DUMMY_ARGS = {'dummy', 'arg0', 'arg1', 'arg2', | IGNORE_DUMMY_ARGS = {'dummy', 'arg0', 'arg1', 'arg2', | ||||
'arg3', 'arg4', 'arg5', 'arg6', 'arg7', 'arg8', 'arg9'} | 'arg3', 'arg4', 'arg5', 'arg6', 'arg7', 'arg8', 'arg9'} | ||||
▲ Show 20 Lines • Show All 145 Lines • Show Last 20 Lines |