mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 21:12:48 +01:00
6f90cf7a17
b421e6d
Update example bitcoin.conf (Alex Morcos)7d4e950
Allow setting minrelaytxfee to 0 (Alex Morcos)359e8a0
[cleanup] Remove coin age priority completely. (Alex Morcos)f9b9371
[rpc] Remove priorityDelta from prioritisetransaction (Alex Morcos)49be7e1
[rpc] Remove priority information from mempool RPC calls (Alex Morcos)0315888
[test] Remove priority from tests (Alex Morcos)f838005
No longer allow "free" transactions (Alex Morcos)ad727f4
[rpc] sendrawtransaction no longer bypasses minRelayTxFee (Alex Morcos)fe282ac
[cleanup] Remove estimatePriority and estimateSmartPriority (Alex Morcos)400b151
[debug] Change -printpriority option (Alex Morcos)272b25a
[mining] Remove -blockprioritysize. (Alex Morcos)12839cd
[rpc] Remove estimatepriority and estimatesmartpriority. (Alex Morcos)ddf58c7
wallet: Remove sendfree (MarcoFalke) Tree-SHA512: a9a4499405923ce794ef18f9e334dbbd59dfc73a3dc2df6f85cc9c62af6f353ec2eed9c2d5e58e904f918d0d7ab738f403dd4939d9bc2276136864fe63710782 Signed-off-by: Pasta <Pasta@dash.org> Fix backport and fix dash specific priority code
46 lines
1.8 KiB
Python
Executable File
46 lines
1.8 KiB
Python
Executable File
#!/usr/bin/env python3
|
|
# Copyright (c) 2015 The Bitcoin Core developers
|
|
# Distributed under the MIT software license, see the accompanying
|
|
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
'''
|
|
This checks if all command line args are documented.
|
|
Return value is 0 to indicate no error.
|
|
|
|
Author: @MarcoFalke
|
|
'''
|
|
|
|
from subprocess import check_output
|
|
import re
|
|
|
|
FOLDER_GREP = 'src'
|
|
FOLDER_TEST = 'src/test/'
|
|
CMD_ROOT_DIR = '`git rev-parse --show-toplevel`/{}'.format(FOLDER_GREP)
|
|
CMD_GREP_ARGS = r"egrep -r -I '(map(Multi)?Args(\.count\(|\[)|Get(Bool)?Arg\()\"\-[^\"]+?\"' {} | grep -v '{}'".format(CMD_ROOT_DIR, FOLDER_TEST)
|
|
CMD_GREP_DOCS = r"egrep -r -I 'HelpMessageOpt\(\"\-[^\"=]+?(=|\")' {}".format(CMD_ROOT_DIR)
|
|
REGEX_ARG = re.compile(r'(?:map(?:Multi)?Args(?:\.count\(|\[)|Get(?:Bool)?Arg\()\"(\-[^\"]+?)\"')
|
|
REGEX_DOC = re.compile(r'HelpMessageOpt\(\"(\-[^\"=]+?)(?:=|\")')
|
|
# list unsupported, deprecated and duplicate args as they need no documentation
|
|
SET_DOC_OPTIONAL = set(['-rpcssl', '-benchmark', '-h', '-help', '-socks', '-tor', '-debugnet', '-whitelistalwaysrelay', '-blockminsize', '-sendfreetransactions'])
|
|
|
|
def main():
|
|
used = check_output(CMD_GREP_ARGS, shell=True, universal_newlines=True)
|
|
docd = check_output(CMD_GREP_DOCS, shell=True, universal_newlines=True)
|
|
|
|
args_used = set(re.findall(REGEX_ARG,used))
|
|
args_docd = set(re.findall(REGEX_DOC,docd)).union(SET_DOC_OPTIONAL)
|
|
args_need_doc = args_used.difference(args_docd)
|
|
args_unknown = args_docd.difference(args_used)
|
|
|
|
print("Args used : {}".format(len(args_used)))
|
|
print("Args documented : {}".format(len(args_docd)))
|
|
print("Args undocumented: {}".format(len(args_need_doc)))
|
|
print(args_need_doc)
|
|
print("Args unknown : {}".format(len(args_unknown)))
|
|
print(args_unknown)
|
|
|
|
exit(len(args_need_doc))
|
|
|
|
if __name__ == "__main__":
|
|
main()
|