From 1b16eb9f194994f6a7a1d469971d734f42702dcb Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sat, 19 Oct 2019 18:32:03 -0400 Subject: [PATCH] remove junk --- doc/payment-api.md | 2 +- qa/rpc-tests/verushash.py | 99 -------------------------- qa/verus-cli-tests/verus-cli-tester.py | 39 ---------- src/fiat/verus | 7 -- src/fiat/verus.bat | 14 ---- src/verusd | 5 -- src/verusd.bat | 10 --- 7 files changed, 1 insertion(+), 175 deletions(-) delete mode 100755 qa/rpc-tests/verushash.py delete mode 100644 qa/verus-cli-tests/verus-cli-tester.py delete mode 100755 src/fiat/verus delete mode 100644 src/fiat/verus.bat delete mode 100755 src/verusd delete mode 100644 src/verusd.bat diff --git a/doc/payment-api.md b/doc/payment-api.md index 8737b7dae..3eff3aa93 100644 --- a/doc/payment-api.md +++ b/doc/payment-api.md @@ -64,7 +64,7 @@ Command | Parameters | Description z_exportkey | zaddr | _Requires an unlocked wallet or an unencrypted wallet._

Return a zkey for a given zaddr belonging to the node’s wallet.

The key will be returned as a string formatted using Base58Check as described in the Zcash protocol spec.

Output:AKWUAkypwQjhZ6LLNaMuuuLcmZ6gt5UFyo8m3jGutvALmwZKLdR5 z_importkey | zkey [rescan=true] | _Wallet must be unlocked._

Add a zkey as returned by z_exportkey to a node's wallet.

The key should be formatted using Base58Check as described in the Zcash protocol spec.

Set rescan to true (the default) to rescan the entire local block database for transactions affecting any address or pubkey script in the wallet (including transactions affecting the newly-added address for this spending key). z_exportwallet | filename | _Requires an unlocked wallet or an unencrypted wallet._

Creates or overwrites a file with taddr private keys and zaddr private keys in a human-readable format.

Filename is the file in which the wallet dump will be placed. May be prefaced by an absolute file path. An existing file with that name will be overwritten.

No value is returned but a JSON-RPC error will be reported if a failure occurred. -z_importwallet | filename | _Requires an unlocked wallet or an unencrypted wallet._

Imports private keys from a file in wallet export file format (see z_exportwallet). These keys will be added to the keys currently in the wallet. This call may need to rescan all or parts of the block chain for transactions affecting the newly-added keys, which may take several minutes.

Filename is the file to import. The path is relative to verusd’s working directory.

No value is returned but a JSON-RPC error will be reported if a failure occurred. +z_importwallet | filename | _Requires an unlocked wallet or an unencrypted wallet._

Imports private keys from a file in wallet export file format (see z_exportwallet). These keys will be added to the keys currently in the wallet. This call may need to rescan all or parts of the block chain for transactions affecting the newly-added keys, which may take several minutes.

Filename is the file to import. The path is relative to hushd’s working directory.

No value is returned but a JSON-RPC error will be reported if a failure occurred. z_exportviewingkey | zaddr | Reveals the viewing key corresponding to 'zaddr'. Then the z_importviewingkey can be used with this output. z_importviewingkey | vkey [rescan=whenkeyisnew] [startHeight=0] | Adds a viewing key (as returned by z_exportviewingkey) to your wallet. diff --git a/qa/rpc-tests/verushash.py b/qa/rpc-tests/verushash.py deleted file mode 100755 index db1ab20e9..000000000 --- a/qa/rpc-tests/verushash.py +++ /dev/null @@ -1,99 +0,0 @@ -#!/usr/bin/env python2 -# Copyright (c) 2018 SuperNET developers -# Distributed under the MIT software license, see the accompanying -# file COPYING or http://www.opensource.org/licenses/mit-license.php. - -from test_framework.test_framework import BitcoinTestFramework -from test_framework.authproxy import JSONRPCException -from test_framework.util import assert_equal, assert_greater_than, \ - initialize_chain_clean, initialize_chain, start_nodes, start_node, connect_nodes_bi, \ - stop_nodes, sync_blocks, sync_mempools, wait_bitcoinds, rpc_port, assert_raises - -import time -from decimal import Decimal -from random import choice -from string import ascii_uppercase - -def assert_success(result): - assert_equal(result['result'], 'success') - -def assert_error(result): - assert_equal(result['result'], 'error') - -def generate_random_string(length): - random_string = ''.join(choice(ascii_uppercase) for i in range(length)) - return random_string - - -class VerusHashTest (BitcoinTestFramework): - - def setup_chain(self): - print("Initializing VerusHash test directory "+self.options.tmpdir) - self.num_nodes = 2 - initialize_chain_clean(self.options.tmpdir, self.num_nodes) - - def setup_network(self, split = False): - print("Setting up network...") - self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, - extra_args=[[ - # always give -ac_name as first extra_arg and port as third - '-ac_name=REGTEST', - '-conf='+self.options.tmpdir+'/node0/REGTEST.conf', - '-port=64367', - '-rpcport=64368', - '-regtest', - '-addressindex=1', - '-spentindex=1', - '-ac_supply=5555555', - '-ac_reward=10000000000000', - '-ac_algo=verushash', - '-ac_cc=2', - '-whitelist=127.0.0.1', - '-debug', - '--daemon', - '-rpcuser=rt', - '-rpcpassword=rt' - ], - ['-ac_name=REGTEST', - '-conf='+self.options.tmpdir+'/node1/REGTEST.conf', - '-port=64365', - '-rpcport=64366', - '-regtest', - '-addressindex=1', - '-spentindex=1', - '-ac_supply=5555555', - '-ac_reward=10000000000000', - '-ac_algo=verushash', - '-ac_cc=2', - '-whitelist=127.0.0.1', - '-debug', - '-addnode=127.0.0.1:64367', - '--daemon', - '-rpcuser=rt', - '-rpcpassword=rt']] - ) - self.is_network_split = split - self.rpc = self.nodes[0] - self.rpc1 = self.nodes[1] - self.sync_all() - print("Done setting up network") - - def send_and_mine(self, xtn, rpc_connection): - txid = rpc_connection.sendrawtransaction(xtn) - assert txid, 'got txid' - # we need the tx above to be confirmed in the next block - rpc_connection.generate(1) - return txid - - def run_test (self): - print("Mining blocks...") - rpc = self.nodes[0] - rpc1 = self.nodes[1] - # utxos from block 1 become mature in block 101 - rpc.generate(101) - self.sync_all() - rpc.getinfo() - rpc1.getinfo() - -if __name__ == '__main__': - VerusHashTest ().main() diff --git a/qa/verus-cli-tests/verus-cli-tester.py b/qa/verus-cli-tests/verus-cli-tester.py deleted file mode 100644 index 147686110..000000000 --- a/qa/verus-cli-tests/verus-cli-tester.py +++ /dev/null @@ -1,39 +0,0 @@ -from subprocess import Popen, check_output, call -from time import sleep -from os import environ, path - -daemon_wrapper = "verusd" -cli_wrapper = "verus" -daemon_runtime_seconds = 600 -cli_commands = ["getblockchaininfo", "getmininginfo", "getwalletinfo", "stop"] - - -def start_daemon(daemon_wrapper): - try: - Popen(daemon_wrapper, shell=True, close_fds=True) - except: - exit(1) - - -def fetch_zcash_params(): - try: - call("fetch-params", shell=True) - except: - exit(1) - - -def run_cli_commands(cli_wrapper, commands): - for command in commands: - command = "%(cli_wrapper)s %(command)s" % locals() - try: - with open(path.join(environ["CI_PROJECT_DIR"], "log.txt"), "a") as log: - command_output = check_output(command, shell=True) - log.write("%(command_output)s\n" % locals()) - except: - exit(1) - - -fetch_zcash_params() -start_daemon(daemon_wrapper) -sleep(daemon_runtime_seconds) -run_cli_commands(cli_wrapper, cli_commands) diff --git a/src/fiat/verus b/src/fiat/verus deleted file mode 100755 index 956ac71c4..000000000 --- a/src/fiat/verus +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -#set working directory to the location of this script -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -cd $DIR - -../komodo-cli -ac_name=VRSC "$@" diff --git a/src/fiat/verus.bat b/src/fiat/verus.bat deleted file mode 100644 index 0bf87d33b..000000000 --- a/src/fiat/verus.bat +++ /dev/null @@ -1,14 +0,0 @@ -@call :GET_CURRENT_DIR -@cd %THIS_DIR% -komodo-cli.exe -ac_name=VRSC %1 %2 %3 %4 %5 %6 %7 %8 %9 -@goto :EOF - -:GET_CURRENT_DIR -@pushd %~dp0 -@set THIS_DIR=%CD% -@popd -@goto :EOF - - - - diff --git a/src/verusd b/src/verusd deleted file mode 100755 index 179585519..000000000 --- a/src/verusd +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -#set working directory to the location of this script -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -cd $DIR -./komodod -ac_name=VRSC -ac_algo=verushash -ac_cc=1 -ac_supply=0 -ac_eras=3 -ac_reward=0,38400000000,2400000000 -ac_halving=1,43200,1051920 -ac_decay=100000000,0,0 -ac_end=10080,226080,0 -ac_timelockgte=19200000000 -ac_timeunlockfrom=129600 -ac_timeunlockto=1180800 -ac_veruspos=50 "$@" diff --git a/src/verusd.bat b/src/verusd.bat deleted file mode 100644 index b921ed452..000000000 --- a/src/verusd.bat +++ /dev/null @@ -1,10 +0,0 @@ -@call :GET_CURRENT_DIR -@cd %THIS_DIR% -komodod.exe -ac_name=VRSC -ac_algo=verushash -ac_cc=1 -ac_supply=0 -ac_eras=3 -ac_reward=0,38400000000,2400000000 -ac_halving=1,43200,1051920 -ac_decay=100000000,0,0 -ac_end=10080,226080,0 -ac_timelockgte=19200000000 -ac_timeunlockfrom=129600 -ac_timeunlockto=1180800 -ac_veruspos=50 %1 %2 %3 %4 %5 %6 %7 %8 %9 -@goto :EOF - -:GET_CURRENT_DIR -@pushd %~dp0 -@set THIS_DIR=%CD% -@popd -@goto :EOF