decred.org/dcrdex@v1.0.5/dex/testing/ltc/README.md (about)

     1  # LTC Simnet Test Harness
     2  
     3  You must have `litecoind` and `litecoin-cli` in `PATH` to use the harness.
     4  
     5  The harness script will create three connected regnet nodes and wallets, and
     6  then mine some blocks and send some LTC around. The result is a set of wallets
     7  named **alpha**, **beta**, and **gamma**, each with slightly different
     8  properties.
     9  
    10  **Beta** is purely a mining node/wallet and has never sent a transaction. Beta
    11  does have some mature coinbase transaction outputs to spend.
    12  
    13  **Alpha** is also a mining node/wallet. Unlike beta, alpha has sent some LTC
    14  so has some change outputs that are not coinbase and have varying number of
    15  confirmations.
    16  
    17  **Gamma** is another wallet on the alpha node. Gamma is encrypted, so requires
    18  unlocking for sensitive operations. Gamma has no coinbase-spending outputs,
    19  but has a number of UTXOs of varying size and confirmation count.
    20  **The gamma wallet password is "abc"**.
    21  
    22  ## Harness control scripts
    23  
    24  The `./harness.sh` script will drop you into a tmux window in a directory
    25  called `harness-ctl`. Inside of this directory are a number of scripts to
    26  allow you to perform RPC calls against each wallet.
    27  
    28  `./alpha`, `./beta`, and `./gamma` are just `litecoin-cli` configured for their
    29  respective wallets.
    30  Try `./gamma getbalance`, for example.
    31  
    32  `./reorg` will step through a script that causes the alpha node to undergo a
    33  1-deep reorganization.
    34  
    35  `./quit` shuts down the nodes and closes the tmux session.
    36  
    37  ## Dev Stuff
    38  
    39  If things aren't looking right, you may need to look at the node windows to
    40  see errors. In tmux, you can navigate between windows by typing `Ctrl+b` and
    41  then the window number. The window numbers are listed at the bottom
    42  of the tmux window. `Ctrl+b` followed by the number `0`, for example, will
    43  change to the alpha node window. Examining the node output to look for errors
    44  is usually a good first debugging step.
    45  
    46  An unfortunate issue that will pop up if you're fiddling with the script is
    47  zombie litecoind processes preventing the harness nodes from binding to the
    48  specified ports. You'll have to manually hunt down the zombie PIDs and `kill`
    49  them if this happens.
    50  
    51  Don't forget that there may be tests that rely on the existing script's
    52  specifics to function correctly. Changes must be tested throughout dcrdex.