aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/gpg_keys/anon.asc13
-rw-r--r--utils/health/README.md21
-rwxr-xr-xutils/python-rpc/console.py13
-rw-r--r--utils/python-rpc/framework/daemon.py13
-rw-r--r--utils/python-rpc/framework/wallet.py11
5 files changed, 62 insertions, 9 deletions
diff --git a/utils/gpg_keys/anon.asc b/utils/gpg_keys/anon.asc
new file mode 100644
index 000000000..83e1a0cd3
--- /dev/null
+++ b/utils/gpg_keys/anon.asc
@@ -0,0 +1,13 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+
+mDMEAAAAGBYJKwYBBAHaRw8BAQdAtk3N9Qcw9x3s5frY00j/jO10wfOCZ59mTLtN
+tsYJ1620GGFub24gPGFub24gW2F0XSBub3doZXJlPoiQBBMWCAA4FiEEn2DdNuXc
+KHIjsNT304V8F6p/losFAmAhnpUCGyMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AA
+CgkQ04V8F6p/loumGwEAxjmzDa6ZK7zsps0sYbOvlh0tmxByUqZy1GvIaiOpdboA
+/2guWA0tzK+fyQS2L2oXzFwh+oTk5bZ2KqnnfCr9a6kDuDgEYCG1oRIKKwYBBAGX
+VQEFAQEHQCnTdYrNM/yw++BSJPgPAoImGhrKaqBoe5VBi9TUk+8aAwEIB4h4BBgW
+CAAgFiEEn2DdNuXcKHIjsNT304V8F6p/losFAmAhtaECGwwACgkQ04V8F6p/lose
+3AD9E3e4olBj7e6t5NtlMkkBzYKs16RNZRMJ5GMOw8lH8NUA/imPWARO2Y4ryswV
+LAtQE1x0SCd4wEP8QEta4p2OYscI
+=9Mvr
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/utils/health/README.md b/utils/health/README.md
index 8fadd3908..05eb057a1 100644
--- a/utils/health/README.md
+++ b/utils/health/README.md
@@ -1,26 +1,32 @@
-#Intro
+# Intro
+
This directory contains tools, which can be used for checking the health of the project, like build/run time analyzers, lints, etc.
-#Usage
+# Usage
+
Unless it's stated differently, these scripts should be called from a given source directory, where you want the checks to be performed, for instance:
`og@ghetto:~/dev/monero$ utils/health/clang-build-time-analyzer-run.sh`
-##ClangBuildAnalyzer
+## ClangBuildAnalyzer
+
`utils/health/clang-build-time-analyzer-run.sh`
The CBA helps in finding culprints of slow compilation.
On the first run, the script will complain about the missing ClangBuildAnalyzer binary and will point you to another script, which is able to clone and build the required binary.
-##clang-tidy
+## clang-tidy
+
`utils/health/clang-tidy-run.sh`
Performs Lint checks on the source code and stores the result in the build directory. More information on the [home page](https://clang.llvm.org/extra/clang-tidy/).
-##include-what-you-use
+## include-what-you-use
+
`utils/health/clang-include-what-you-use-run.sh`
Analyses the header file hierarchy and delivers hints on how to reduce their complexity. More information on the [home page](https://include-what-you-use.org/).
-##Valgrind checks
+## Valgrind checks
+
`utils/health/valgrind-tests.sh`
This script is able to run valgrind's callgrind, cachegrind and memcheck for a given set of executables.
It expects ONE PARAMETER, which points to a file with paths to executables and their arguments, written line by line. For example:
@@ -33,6 +39,7 @@ build/tests/unit_tests/unit_tests
The `*.out` results can be interpreted with the `kcachegrind` tool.
The memcheck output is just a readable text file with a summary at the end.
-#Footer
+# Footer
+
Responsible: mj-xmr
diff --git a/utils/python-rpc/console.py b/utils/python-rpc/console.py
index c94e07eab..4b3c18f5d 100755
--- a/utils/python-rpc/console.py
+++ b/utils/python-rpc/console.py
@@ -4,7 +4,16 @@ from __future__ import print_function
import sys
import subprocess
import socket
-import urlparse
+try:
+ import urllib.parse
+ url_parser = urllib.parse.urlparse
+except:
+ try:
+ import urlparse
+ url_parser = urlparse.urlparse
+ except:
+ print('urllib or urlparse is needed')
+ sys.exit(1)
import framework.rpc
import framework.daemon
import framework.wallet
@@ -21,7 +30,7 @@ for n in range(1, len(sys.argv)):
try:
port = int(sys.argv[n])
except:
- t = urlparse.urlparse(sys.argv[n], allow_fragments = False)
+ t = url_parser(sys.argv[n], allow_fragments = False)
scheme = t.scheme or scheme
host = t.hostname or host
port = t.port or port
diff --git a/utils/python-rpc/framework/daemon.py b/utils/python-rpc/framework/daemon.py
index 435bc93f8..207565e6f 100644
--- a/utils/python-rpc/framework/daemon.py
+++ b/utils/python-rpc/framework/daemon.py
@@ -53,6 +53,19 @@ class Daemon(object):
return self.rpc.send_json_rpc_request(getblocktemplate)
get_block_template = getblocktemplate
+ def add_aux_pow(self, blocktemplate_blob, aux_pow, client = ""):
+ add_aux_pow = {
+ 'method': 'add_aux_pow',
+ 'params': {
+ 'blocktemplate_blob': blocktemplate_blob,
+ 'aux_pow' : aux_pow,
+ 'client' : client,
+ },
+ 'jsonrpc': '2.0',
+ 'id': '0'
+ }
+ return self.rpc.send_json_rpc_request(add_aux_pow)
+
def send_raw_transaction(self, tx_as_hex, do_not_relay = False, do_sanity_checks = True, client = ""):
send_raw_transaction = {
'client': client,
diff --git a/utils/python-rpc/framework/wallet.py b/utils/python-rpc/framework/wallet.py
index d97c24143..aca7c82bb 100644
--- a/utils/python-rpc/framework/wallet.py
+++ b/utils/python-rpc/framework/wallet.py
@@ -1088,3 +1088,14 @@ class Wallet(object):
'id': '0'
}
return self.rpc.send_json_rpc_request(get_version)
+
+ def scan_tx(self, txids):
+ scan_tx = {
+ 'method': 'scan_tx',
+ 'jsonrpc': '2.0',
+ 'params' : {
+ 'txids': txids,
+ },
+ 'id': '0'
+ }
+ return self.rpc.send_json_rpc_request(scan_tx)