Ver código fonte

Starwels start

000000003d69a915e9da53348c5c272978bb743442e3a6341c11061c125811a2
00000000c5a2df98ed0b29d576af8b99b3c6b65052614da34292aa4a109b3004
79a6a4d5e19d4e5c6783691ba9ad75c7c352f906275b93dcad27ea0c3017ec80
tags/v0.15.1
SHI 2 anos atrás
pai
commit
d4ed7468e7
66 arquivos alterados com 261 adições e 3203 exclusões
  1. 1
    1
      .github/ISSUE_TEMPLATE.md
  2. 1
    1
      .travis.yml
  3. 1
    1
      configure.ac
  4. 1
    1
      contrib/README.md
  5. 1
    1
      contrib/debian/control
  6. 1
    1
      contrib/debian/copyright
  7. 8
    8
      contrib/debian/examples/starwels.conf
  8. 1
    1
      contrib/linearize/README.md
  9. 4
    4
      contrib/linearize/example-linearize.cfg
  10. 1
    1
      contrib/linearize/linearize-data.py
  11. 1
    1
      contrib/linearize/linearize-hashes.py
  12. 1
    1
      contrib/qos/README.md
  13. 5
    5
      contrib/qos/tc.sh
  14. 1
    1
      contrib/rpm/README.md
  15. 10
    10
      contrib/rpm/starwels.spec
  16. 2
    2
      contrib/seeds/generate-seeds.py
  17. 2
    1450
      contrib/seeds/nodes_main.txt
  18. 3
    8
      contrib/seeds/nodes_test.txt
  19. 1
    1
      contrib/verifybinaries/README.md
  20. 5
    5
      contrib/verifybinaries/verify.sh
  21. 5
    5
      contrib/zmq/zmq_sub.py
  22. 5
    5
      contrib/zmq/zmq_sub3.4.py
  23. 1
    1
      depends/Makefile
  24. 3
    3
      doc/REST-interface.md
  25. 2
    2
      doc/developer-notes.md
  26. 1
    1
      doc/gitian-building.md
  27. 2
    2
      doc/man/starwels-cli.1
  28. 6
    6
      doc/man/starwels-qt.1
  29. 1
    1
      doc/man/starwels-tx.1
  30. 6
    6
      doc/man/starwelsd.1
  31. 5
    5
      doc/release-notes/release-notes-0.10.0.md
  32. 4
    4
      doc/release-notes/release-notes-0.12.0.md
  33. 3
    3
      doc/release-notes/release-notes-0.13.1.md
  34. 2
    2
      doc/release-notes/release-notes-0.14.0.md
  35. 2
    2
      doc/release-notes/release-notes-0.15.0.md
  36. 1
    1
      doc/release-notes/release-notes-0.3.12.md
  37. 1
    1
      doc/release-notes/release-notes-0.3.18.md
  38. 1
    1
      doc/release-notes/release-notes-0.7.1.md
  39. 1
    1
      doc/release-notes/release-notes-0.8.6.md
  40. 1
    1
      doc/release-notes/release-notes-0.9.4.md
  41. 10
    10
      doc/release-process.md
  42. 4
    4
      doc/tor.md
  43. 1
    1
      doc/zmq.md
  44. BIN
      share/pixmaps/nsis-header.bmp
  45. BIN
      share/pixmaps/nsis-wizard.bmp
  46. 2
    2
      share/qt/Info.plist.in
  47. 33
    64
      src/chainparams.cpp
  48. 3
    3
      src/chainparamsbase.cpp
  49. 4
    1457
      src/chainparamsseeds.h
  50. 1
    1
      src/clientversion.cpp
  51. 1
    1
      src/init.cpp
  52. 21
    21
      src/protocol.h
  53. 1
    1
      src/qt/guiconstants.h
  54. 1
    1
      src/qt/intro.cpp
  55. 1
    1
      src/qt/test/rpcnestedtests.cpp
  56. 5
    5
      src/rpc/net.cpp
  57. 1
    1
      src/rpc/server.cpp
  58. 1
    1
      src/starwelsd.cpp
  59. 35
    35
      src/test/addrman_tests.cpp
  60. 1
    1
      src/test/miner_tests.cpp
  61. 2
    2
      src/test/net_tests.cpp
  62. 9
    13
      src/test/netbase_tests.cpp
  63. 2
    2
      src/test/pow_tests.cpp
  64. 9
    9
      src/test/util_tests.cpp
  65. 8
    9
      test/functional/proxy_test.py
  66. 1
    1
      test/functional/zmq_test.py

+ 1
- 1
.github/ISSUE_TEMPLATE.md Ver arquivo

@@ -4,7 +4,7 @@ This issue tracker is only for technical issues related to starwels.

General starwels questions and/or support requests and are best directed to the [Starwels StackExchange](https://bitcoin.stackexchange.com).

For reporting security issues, please read instructions at [https://localhost/en/contact/](https://localhost/en/contact/).
For reporting security issues, please read instructions at [https://github.com/starwels/en/contact/](https://github.com/starwels/en/contact/).

### Describe the issue


+ 1
- 1
.travis.yml Ver arquivo

@@ -17,7 +17,7 @@ env:
- CCACHE_TEMPDIR=/tmp/.ccache-temp
- CCACHE_COMPRESS=1
- BASE_OUTDIR=$TRAVIS_BUILD_DIR/out
- SDK_URL=https://localhost/depends-sources/sdks
- SDK_URL=https://github.com/starwels/depends-sources/sdks
- PYTHON_DEBUG=1
- WINEDEBUG=fixme-all
matrix:

+ 1
- 1
configure.ac Ver arquivo

@@ -8,7 +8,7 @@ define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2017)
define(_COPYRIGHT_HOLDERS,[The %s developers])
define(_COPYRIGHT_HOLDERS_SUBSTITUTION,[[Starwels]])
AC_INIT([Starwels],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[https://github.com/bitcoin/bitcoin/issues],[starwels],[https://localhost/])
AC_INIT([Starwels],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[https://github.com/bitcoin/bitcoin/issues],[starwels],[https://github.com/starwels/])
AC_CONFIG_SRCDIR([src/validation.cpp])
AC_CONFIG_HEADERS([src/config/starwels-config.h])
AC_CONFIG_AUX_DIR([build-aux])

+ 1
- 1
contrib/README.md Ver arquivo

@@ -47,4 +47,4 @@ Test and Verify Tools
Utilities to generate test vectors for the data-driven Starwels tests.

### [Verify Binaries](/contrib/verifybinaries) ###
This script attempts to download and verify the signature file SHA256SUMS.asc from localhost.
This script attempts to download and verify the signature file SHA256SUMS.asc from github.com/starwels.

+ 1
- 1
contrib/debian/control Ver arquivo

@@ -26,7 +26,7 @@ Build-Depends: debhelper,
python,
libzmq3-dev
Standards-Version: 3.9.2
Homepage: https://localhost/
Homepage: https://github.com/starwels/
Vcs-Git: git://github.com/starwels/starwels.git
Vcs-Browser: https://github.com/starwels/starwels


+ 1
- 1
contrib/debian/copyright Ver arquivo

@@ -7,7 +7,7 @@ Source: https://github.com/starwels/starwels
Files: *
Copyright: 2009-2017, Starwels Developers
License: Expat
Comment: The Starwels Developers encompasses the current developers listed on localhost,
Comment: The Starwels Developers encompasses the current developers listed on github.com/starwels,
as well as the numerous contributors to the project.

Files: debian/*

+ 8
- 8
contrib/debian/examples/starwels.conf Ver arquivo

@@ -1,7 +1,7 @@
##
## starwels.conf configuration file. Lines beginning with # are comments.
##
# Network-related settings:

# Run on the test network instead of the real starwels network.
@@ -44,11 +44,11 @@

# Use as many addnode= settings as you like to connect to specific peers
#addnode=69.164.218.197
#addnode=10.0.0.2:8333
#addnode=10.0.0.2:8353

# Alternatively use as many connect= settings as you like to connect ONLY to specific peers
#connect=69.164.218.197
#connect=10.0.0.1:8333
#connect=10.0.0.1:8353

# Listening mode, enabled by default except when 'connect' is being used
#listen=1
@@ -93,7 +93,7 @@
# rpcauth=bob:b2dd077cb54591a2f3139e69a897ac$4e71f08d48b4347cf8eff3815c0e25ae2e9a4340474079f55705f40574f4ec99

# How many seconds starwels will wait for a complete RPC HTTP request.
# after the HTTP connection is established.
# after the HTTP connection is established.
#rpcclienttimeout=30

# By default, only RPC connections from localhost are allowed.
@@ -104,13 +104,13 @@
# because the rpcpassword is transmitted over the network unencrypted.

# server=1 tells Starwels-Qt to accept JSON-RPC commands.
# it is also read by starwelsd to determine if RPC should be enabled
# it is also read by starwelsd to determine if RPC should be enabled
#rpcallowip=10.1.1.34/255.255.255.0
#rpcallowip=1.2.3.4/24
#rpcallowip=2001:db8:85a3:0:0:8a2e:370:7334/96

# Listen for RPC connections on this TCP port:
#rpcport=8332
#rpcport=8352

# You can use Starwels or starwelsd to send commands to Starwels/starwelsd
# running on another host using this option:
@@ -131,11 +131,11 @@
# be validated sooner.
#paytxfee=0.00

# Enable pruning to reduce storage requirements by deleting old blocks.
# Enable pruning to reduce storage requirements by deleting old blocks.
# This mode is incompatible with -txindex and -rescan.
# 0 = default (no pruning).
# 1 = allows manual pruning via RPC.
# >=550 = target to stay under in MiB.
# >=550 = target to stay under in MiB.
#prune=550

# User interface options

+ 1
- 1
contrib/linearize/README.md Ver arquivo

@@ -12,7 +12,7 @@ Required configuration file settings for linearize-hashes:

Optional config file setting for linearize-hashes:
* RPC: `host` (Default: `127.0.0.1`)
* RPC: `port` (Default: `8332`)
* RPC: `port` (Default: `8352`)
* Blockchain: `min_height`, `max_height`
* `rev_hash_bytes`: If true, the written block hash list will be
byte-reversed. (In other words, the hash returned by getblockhash will have its

+ 4
- 4
contrib/linearize/example-linearize.cfg Ver arquivo

@@ -3,8 +3,8 @@ rpcuser=someuser
rpcpassword=somepassword
#datadir=~/.starwels
host=127.0.0.1
port=8332
#port=18332
port=8352
#port=18352

# bootstrap.dat hashlist settings (linearize-hashes)
max_height=313000
@@ -13,12 +13,12 @@ max_height=313000

# mainnet
netmagic=f9beb4d9
genesis=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
genesis=000000003d69a915e9da53348c5c272978bb743442e3a6341c11061c125811a2
input=/home/example/.starwels/blocks

# testnet
#netmagic=0b110907
#genesis=000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943
#genesis=00000000c5a2df98ed0b29d576af8b99b3c6b65052614da34292aa4a109b3004
#input=/home/example/.starwels/testnet3/blocks

# "output" option causes blockchain files to be written to the given location,

+ 1
- 1
contrib/linearize/linearize-data.py Ver arquivo

@@ -285,7 +285,7 @@ if __name__ == '__main__':
if 'netmagic' not in settings:
settings['netmagic'] = 'f9beb4d9'
if 'genesis' not in settings:
settings['genesis'] = '000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f'
settings['genesis'] = '000000003d69a915e9da53348c5c272978bb743442e3a6341c11061c125811a2'
if 'input' not in settings:
settings['input'] = 'input'
if 'hashlist' not in settings:

+ 1
- 1
contrib/linearize/linearize-hashes.py Ver arquivo

@@ -125,7 +125,7 @@ if __name__ == '__main__':
if 'host' not in settings:
settings['host'] = '127.0.0.1'
if 'port' not in settings:
settings['port'] = 8332
settings['port'] = 8352
if 'min_height' not in settings:
settings['min_height'] = 0
if 'max_height' not in settings:

+ 1
- 1
contrib/qos/README.md Ver arquivo

@@ -1,5 +1,5 @@
### QoS (Quality of service) ###

This is a Linux bash script that will set up tc to limit the outgoing bandwidth for connections to the Starwels network. It limits outbound TCP traffic with a source or destination port of 8333, but not if the destination IP is within a LAN.
This is a Linux bash script that will set up tc to limit the outgoing bandwidth for connections to the Starwels network. It limits outbound TCP traffic with a source or destination port of 8353, but not if the destination IP is within a LAN.

This means one can have an always-on starwelsd instance running, and another local starwelsd/starwels-qt instance which connects to this node and receives blocks from it.

+ 5
- 5
contrib/qos/tc.sh Ver arquivo

@@ -44,16 +44,16 @@ fi
# ret=$?
#done

#limit outgoing traffic to and from port 8333. but not when dealing with a host on the local network
#limit outgoing traffic to and from port 8353. but not when dealing with a host on the local network
# (defined by $LOCALNET_V4 and $LOCALNET_V6)
# --set-mark marks packages matching these criteria with the number "2" (v4)
# --set-mark marks packages matching these criteria with the number "4" (v6)
# these packets are filtered by the tc filter with "handle 2"
# this filter sends the packages into the 1:11 class, and this class is limited to ${LIMIT}
iptables -t mangle -A OUTPUT -p tcp -m tcp --dport 8333 ! -d ${LOCALNET_V4} -j MARK --set-mark 0x2
iptables -t mangle -A OUTPUT -p tcp -m tcp --sport 8333 ! -d ${LOCALNET_V4} -j MARK --set-mark 0x2
iptables -t mangle -A OUTPUT -p tcp -m tcp --dport 8353 ! -d ${LOCALNET_V4} -j MARK --set-mark 0x2
iptables -t mangle -A OUTPUT -p tcp -m tcp --sport 8353 ! -d ${LOCALNET_V4} -j MARK --set-mark 0x2

if [ ! -z "${LOCALNET_V6}" ] ; then
ip6tables -t mangle -A OUTPUT -p tcp -m tcp --dport 8333 ! -d ${LOCALNET_V6} -j MARK --set-mark 0x4
ip6tables -t mangle -A OUTPUT -p tcp -m tcp --sport 8333 ! -d ${LOCALNET_V6} -j MARK --set-mark 0x4
ip6tables -t mangle -A OUTPUT -p tcp -m tcp --dport 8353 ! -d ${LOCALNET_V6} -j MARK --set-mark 0x4
ip6tables -t mangle -A OUTPUT -p tcp -m tcp --sport 8353 ! -d ${LOCALNET_V6} -j MARK --set-mark 0x4
fi

+ 1
- 1
contrib/rpm/README.md Ver arquivo

@@ -15,7 +15,7 @@ It is considered good form for all sources to reference a URL where the source
can be downloaded.

Sources 0-9 should be reserved for source code tarballs. `Source0` should
reference the release tarball available from https://localhost/bin/ and
reference the release tarball available from https://github.com/starwels/bin/ and
`Source1` should reference the BerkeleyDB source.

Sources 10-99 are for source files that are maintained in the

+ 10
- 10
contrib/rpm/starwels.spec Ver arquivo

@@ -20,8 +20,8 @@ Summary: Peer to Peer Cryptographic Currency

Group: Applications/System
License: MIT
URL: https://localhost/
Source0: https://localhost/bin/starwels-%{version}/starwels-%{version}.tar.gz
URL: https://github.com/starwels/
Source0: https://github.com/starwels/bin/starwels-%{version}/starwels-%{version}.tar.gz
Source1: http://download.oracle.com/berkeley-db/db-%{bdbv}.NC.tar.gz

Source10: https://raw.githubusercontent.com/starwels/starwels/v%{version}/contrib/debian/examples/starwels.conf
@@ -332,10 +332,10 @@ if [ `%{_sbindir}/sestatus |grep -c "disabled"` -eq 0 ]; then
for selinuxvariant in %{selinux_variants}; do
%{_sbindir}/semodule -s ${selinuxvariant} -i %{_datadir}/selinux/${selinuxvariant}/starwels.pp &> /dev/null || :
done
%{_sbindir}/semanage port -a -t starwels_port_t -p tcp 8332
%{_sbindir}/semanage port -a -t starwels_port_t -p tcp 8333
%{_sbindir}/semanage port -a -t starwels_port_t -p tcp 18332
%{_sbindir}/semanage port -a -t starwels_port_t -p tcp 18333
%{_sbindir}/semanage port -a -t starwels_port_t -p tcp 8352
%{_sbindir}/semanage port -a -t starwels_port_t -p tcp 8353
%{_sbindir}/semanage port -a -t starwels_port_t -p tcp 18352
%{_sbindir}/semanage port -a -t starwels_port_t -p tcp 18353
%{_sbindir}/fixfiles -R starwels-server restore &> /dev/null || :
%{_sbindir}/restorecon -R %{_localstatedir}/lib/starwels || :
fi
@@ -351,10 +351,10 @@ fi
# SELinux
if [ $1 -eq 0 ]; then
if [ `%{_sbindir}/sestatus |grep -c "disabled"` -eq 0 ]; then
%{_sbindir}/semanage port -d -p tcp 8332
%{_sbindir}/semanage port -d -p tcp 8333
%{_sbindir}/semanage port -d -p tcp 18332
%{_sbindir}/semanage port -d -p tcp 18333
%{_sbindir}/semanage port -d -p tcp 8352
%{_sbindir}/semanage port -d -p tcp 8353
%{_sbindir}/semanage port -d -p tcp 18352
%{_sbindir}/semanage port -d -p tcp 18353
for selinuxvariant in %{selinux_variants}; do
%{_sbindir}/semodule -s ${selinuxvariant} -r starwels &> /dev/null || :
done

+ 2
- 2
contrib/seeds/generate-seeds.py Ver arquivo

@@ -127,10 +127,10 @@ def main():
g.write(' * IPv4 as well as onion addresses are wrapped inside a IPv6 address accordingly.\n')
g.write(' */\n')
with open(os.path.join(indir,'nodes_main.txt'),'r') as f:
process_nodes(g, f, 'pnSeed6_main', 8333)
process_nodes(g, f, 'pnSeed6_main', 8353)
g.write('\n')
with open(os.path.join(indir,'nodes_test.txt'),'r') as f:
process_nodes(g, f, 'pnSeed6_test', 18333)
process_nodes(g, f, 'pnSeed6_test', 18353)
g.write('#endif // STARWELS_CHAINPARAMSSEEDS_H\n')
if __name__ == '__main__':

+ 2
- 1450
contrib/seeds/nodes_main.txt
Diferenças do arquivo suprimidas por serem muito extensas
Ver arquivo


+ 3
- 8
contrib/seeds/nodes_test.txt Ver arquivo

@@ -1,11 +1,6 @@
# List of fixed seed nodes for testnet

# Onion nodes
thfsmmn2jstarwels.onion
it2pj4f7657g3rhi.onion
nkf5e6b7pl4jfd4a.onion
4zhkir2ofl7orfom.onion
t6xj6wilh4ytvcs7.onion
i6y6ivorwakd7nw3.onion
ubqj4rsu3nqtxmtp.onion
91.240.86.126:18353
94.102.26.117:18353

# Onion nodes

+ 1
- 1
contrib/verifybinaries/README.md Ver arquivo

@@ -13,7 +13,7 @@ uid Wladimir J. van der Laan (Starwels binary release signing k

#### Usage:

This script attempts to download the signature file `SHA256SUMS.asc` from https://localhost.
This script attempts to download the signature file `SHA256SUMS.asc` from https://github.com/starwels.

It first checks if the signature passes, and then downloads the files specified in the file, and checks if the hashes of these files match those that are specified in the signature file.


+ 5
- 5
contrib/verifybinaries/verify.sh Ver arquivo

@@ -4,7 +4,7 @@
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

### This script attempts to download the signature file SHA256SUMS.asc from
### localhost and localhost and compares them.
### github.com/starwels and github.com/starwels and compares them.
### It first checks if the signature passes, and then downloads the files specified in
### the file, and checks if the hashes of these files match those that are specified
### in the signature file.
@@ -23,8 +23,8 @@ TMPFILE="hashes.tmp"

SIGNATUREFILENAME="SHA256SUMS.asc"
RCSUBDIR="test"
HOST1="https://localhost"
HOST2="https://localhost"
HOST1="https://github.com/starwels"
HOST2="https://github.com/starwels"
BASEDIR="/bin/"
VERSIONPREFIX="starwels-"
RCVERSIONSTRING="rc"
@@ -97,7 +97,7 @@ fi

WGETOUT=$(wget -N -O "$SIGNATUREFILENAME.2" "$HOST2$BASEDIR$SIGNATUREFILENAME" 2>&1)
if [ $? -ne 0 ]; then
echo "localhost failed to provide signature file, but localhost did?"
echo "github.com/starwels failed to provide signature file, but github.com/starwels did?"
echo "wget output:"
echo "$WGETOUT"|sed 's/^/\t/g'
clean_up $SIGNATUREFILENAME
@@ -106,7 +106,7 @@ fi

SIGFILEDIFFS="$(diff $SIGNATUREFILENAME $SIGNATUREFILENAME.2)"
if [ "$SIGFILEDIFFS" != "" ]; then
echo "localhost and localhost signature files were not equal?"
echo "github.com/starwels and github.com/starwels signature files were not equal?"
clean_up $SIGNATUREFILENAME $SIGNATUREFILENAME.2
exit 4
fi

+ 5
- 5
contrib/zmq/zmq_sub.py Ver arquivo

@@ -8,10 +8,10 @@

Starwels should be started with the command line arguments:
starwelsd -testnet -daemon \
-zmqpubhashblock=tcp://127.0.0.1:28332 \
-zmqpubrawtx=tcp://127.0.0.1:28332 \
-zmqpubhashtx=tcp://127.0.0.1:28332 \
-zmqpubhashblock=tcp://127.0.0.1:28332
-zmqpubhashblock=tcp://127.0.0.1:28352 \
-zmqpubrawtx=tcp://127.0.0.1:28352 \
-zmqpubhashtx=tcp://127.0.0.1:28352 \
-zmqpubhashblock=tcp://127.0.0.1:28352

We use the asyncio library here. `self.handle()` installs itself as a
future at the end of the function. Since it never returns with the event
@@ -34,7 +34,7 @@ if not (sys.version_info.major >= 3 and sys.version_info.minor >= 5):
print("This example only works with Python 3.5 and greater")
exit(1)

port = 28332
port = 28352

class ZMQHandler():
def __init__(self):

+ 5
- 5
contrib/zmq/zmq_sub3.4.py Ver arquivo

@@ -8,10 +8,10 @@

Starwels should be started with the command line arguments:
starwelsd -testnet -daemon \
-zmqpubhashblock=tcp://127.0.0.1:28332 \
-zmqpubrawtx=tcp://127.0.0.1:28332 \
-zmqpubhashtx=tcp://127.0.0.1:28332 \
-zmqpubhashblock=tcp://127.0.0.1:28332
-zmqpubhashblock=tcp://127.0.0.1:28352 \
-zmqpubrawtx=tcp://127.0.0.1:28352 \
-zmqpubhashtx=tcp://127.0.0.1:28352 \
-zmqpubhashblock=tcp://127.0.0.1:28352

We use the asyncio library here. `self.handle()` installs itself as a
future at the end of the function. Since it never returns with the event
@@ -38,7 +38,7 @@ if not (sys.version_info.major >= 3 and sys.version_info.minor >= 4):
print("This example only works with Python 3.4 and greater")
exit(1)

port = 28332
port = 28352

class ZMQHandler():
def __init__(self):

+ 1
- 1
depends/Makefile Ver arquivo

@@ -6,7 +6,7 @@ SDK_PATH ?= $(BASEDIR)/SDKs
NO_QT ?=
NO_WALLET ?=
NO_UPNP ?=
FALLBACK_DOWNLOAD_PATH ?= https://localhost/depends-sources
FALLBACK_DOWNLOAD_PATH ?= https://github.com/starwels/depends-sources

BUILD = $(shell ./config.guess)
HOST ?= $(BUILD)

+ 3
- 3
doc/REST-interface.md Ver arquivo

@@ -3,7 +3,7 @@ Unauthenticated REST Interface

The REST API can be enabled with the `-rest` option.

The interface runs on the same port as the JSON-RPC interface, by default port 8332 for mainnet and port 18332 for testnet.
The interface runs on the same port as the JSON-RPC interface, by default port 8352 for mainnet and port 18352 for testnet.

Supported API
-------------
@@ -57,7 +57,7 @@ https://github.com/starwels/bips/blob/master/bip-0064.mediawiki

Example:
```
$ curl localhost:18332/rest/getutxos/checkmempool/b2cdfd7b89def827ff8af7cd9bff7627ff72e5e8b0f71210f92ea7a4000c5d75-0.json 2>/dev/null | json_pp
$ curl localhost:18352/rest/getutxos/checkmempool/b2cdfd7b89def827ff8af7cd9bff7627ff72e5e8b0f71210f92ea7a4000c5d75-0.json 2>/dev/null | json_pp
{
"chainHeight" : 325347,
"chaintipHash" : "00000000fb01a7f3745a717f8caebee056c484e6e0bfe4a9591c235bb70506fb",
@@ -99,4 +99,4 @@ Only supports JSON as output format.

Risks
-------------
Running a web browser on the same node with a REST enabled starwelsd can be a risk. Accessing prepared XSS websites could read out tx/block data of your node by placing links like `<script src="http://127.0.0.1:8332/rest/tx/1234567890.json">` which might break the nodes privacy.
Running a web browser on the same node with a REST enabled starwelsd can be a risk. Accessing prepared XSS websites could read out tx/block data of your node by placing links like `<script src="http://127.0.0.1:8352/rest/tx/1234567890.json">` which might break the nodes privacy.

+ 2
- 2
doc/developer-notes.md Ver arquivo

@@ -195,7 +195,7 @@ Threads

- ThreadMapPort : Universal plug-and-play startup/shutdown

- ThreadSocketHandler : Sends/Receives data from peers on port 8333.
- ThreadSocketHandler : Sends/Receives data from peers on port 8353.

- ThreadOpenAddedConnections : Opens network connections to added nodes.

@@ -207,7 +207,7 @@ Threads

- ThreadFlushWalletDB : Close the wallet.dat file if it hasn't been used in 500ms.

- ThreadRPCServer : Remote procedure call handler, listens on port 8332 for connections and services them.
- ThreadRPCServer : Remote procedure call handler, listens on port 8352 for connections and services them.

- StarwelsMiner : Generates starwelss (if wallet is enabled).


+ 1
- 1
doc/gitian-building.md Ver arquivo

@@ -11,7 +11,7 @@ the same, tested dependencies are used and statically built into the executable.
Multiple developers build the source code by following a specific descriptor
("recipe"), cryptographically sign the result, and upload the resulting signature.
These results are compared and only if they match, the build is accepted and uploaded
to localhost.
to github.com/starwels.

More independent Gitian builders are needed, which is why this guide exists.
It is preferred you follow these steps yourself instead of using someone else's

+ 2
- 2
doc/man/starwels-cli.1 Ver arquivo

@@ -48,7 +48,7 @@ Send commands to node running on <ip> (default: 127.0.0.1)
.HP
\fB\-rpcport=\fR<port>
.IP
Connect to JSON\-RPC on <port> (default: 8332 or testnet: 18332)
Connect to JSON\-RPC on <port> (default: 8352 or testnet: 18352)
.HP
\fB\-rpcwait\fR
.IP
@@ -81,7 +81,7 @@ with multiple wallets)
Copyright (C) 2009-2017 The Starwels developers

Please contribute if you find Starwels useful. Visit
<https://localhost> for further information about the software.
<https://github.com/starwels> for further information about the software.
The source code is available from <https://github.com/starwels/starwels>.

This is experimental software.

+ 6
- 6
doc/man/starwels-qt.1 Ver arquivo

@@ -32,9 +32,9 @@ block hash)
If this block is in the chain assume that it and its ancestors are valid
and potentially skip their script verification (0 to verify all,
default:
0000000000000000003b9ce759c2a087d52abc4266f8f4ebd6d768b89defa50a,
0000000002a47ec40e87c18501786717cbebb96efa3bb05505e1c24cce51689e,
testnet:
0000000002e9e7b00e1f6dc5123a04aad68dd0f0968d8c7aa45f6640795c37b1)
00000000bf9f221b2acc9bd6ae001ccd5640615a5e4d9ed94bbb3564d3e372bd)
.HP
\fB\-conf=\fR<file>
.IP
@@ -206,7 +206,7 @@ Support filtering of blocks and transaction with bloom filters (default:
.HP
\fB\-port=\fR<port>
.IP
Listen for connections on <port> (default: 8333 or testnet: 18333)
Listen for connections on <port> (default: 8353 or testnet: 18353)
.HP
\fB\-proxy=\fR<ip:port>
.IP
@@ -501,8 +501,8 @@ option can be specified multiple times
.HP
\fB\-rpcport=\fR<port>
.IP
Listen for JSON\-RPC connections on <port> (default: 8332 or testnet:
18332)
Listen for JSON\-RPC connections on <port> (default: 8352 or testnet:
18352)
.HP
\fB\-rpcallowip=\fR<ip>
.IP
@@ -549,7 +549,7 @@ Reset all settings changed in the GUI
Copyright (C) 2009-2017 The Starwels developers

Please contribute if you find Starwels useful. Visit
<https://localhost> for further information about the software.
<https://github.com/starwels> for further information about the software.
The source code is available from <https://github.com/starwels/starwels>.

This is experimental software.

+ 1
- 1
doc/man/starwels-tx.1 Ver arquivo

@@ -115,7 +115,7 @@ Set register NAME to given JSON\-STRING
Copyright (C) 2009-2017 The Starwels developers

Please contribute if you find Starwels useful. Visit
<https://localhost> for further information about the software.
<https://github.com/starwels> for further information about the software.
The source code is available from <https://github.com/starwels/starwels>.

This is experimental software.

+ 6
- 6
doc/man/starwelsd.1 Ver arquivo

@@ -33,9 +33,9 @@ block hash)
If this block is in the chain assume that it and its ancestors are valid
and potentially skip their script verification (0 to verify all,
default:
0000000000000000003b9ce759c2a087d52abc4266f8f4ebd6d768b89defa50a,
0000000002a47ec40e87c18501786717cbebb96efa3bb05505e1c24cce51689e,
testnet:
0000000002e9e7b00e1f6dc5123a04aad68dd0f0968d8c7aa45f6640795c37b1)
00000000bf9f221b2acc9bd6ae001ccd5640615a5e4d9ed94bbb3564d3e372bd)
.HP
\fB\-conf=\fR<file>
.IP
@@ -211,7 +211,7 @@ Support filtering of blocks and transaction with bloom filters (default:
.HP
\fB\-port=\fR<port>
.IP
Listen for connections on <port> (default: 8333 or testnet: 18333)
Listen for connections on <port> (default: 8353 or testnet: 18353)
.HP
\fB\-proxy=\fR<ip:port>
.IP
@@ -506,8 +506,8 @@ option can be specified multiple times
.HP
\fB\-rpcport=\fR<port>
.IP
Listen for JSON\-RPC connections on <port> (default: 8332 or testnet:
18332)
Listen for JSON\-RPC connections on <port> (default: 8352 or testnet:
18352)
.HP
\fB\-rpcallowip=\fR<ip>
.IP
@@ -528,7 +528,7 @@ Set the number of threads to service RPC calls (default: 4)
Copyright (C) 2009-2017 The Starwels developers

Please contribute if you find Starwels useful. Visit
<https://localhost> for further information about the software.
<https://github.com/starwels> for further information about the software.
The source code is available from <https://github.com/starwels/starwels>.

This is experimental software.

+ 5
- 5
doc/release-notes/release-notes-0.10.0.md Ver arquivo

@@ -142,10 +142,10 @@ unauthenticated access to public node data.
It is served on the same port as RPC, but does not need a password, and uses
plain HTTP instead of JSON-RPC.

Assuming a local RPC server running on port 8332, it is possible to request:
- Blocks: http://localhost:8332/rest/block/*HASH*.*EXT*
- Blocks without transactions: http://localhost:8332/rest/block/notxdetails/*HASH*.*EXT*
- Transactions (requires `-txindex`): http://localhost:8332/rest/tx/*HASH*.*EXT*
Assuming a local RPC server running on port 8352, it is possible to request:
- Blocks: http://localhost:8352/rest/block/*HASH*.*EXT*
- Blocks without transactions: http://localhost:8352/rest/block/notxdetails/*HASH*.*EXT*
- Transactions (requires `-txindex`): http://localhost:8352/rest/tx/*HASH*.*EXT*

In every case, *EXT* can be `bin` (for raw binary data), `hex` (for hex-encoded
binary) or `json`.
@@ -337,7 +337,7 @@ Detailed release notes follow. This overview includes changes that affect extern
behavior, not code moves, refactors or string updates.

RPC:
- `f923c07` Support IPv6 lookup in starwels-cli even when IPv6 only bound on localhost
- `f923c07` Support IPv6 lookup in starwels-cli even when IPv6 only bound on github.com/starwels
- `b641c9c` Fix addnode "onetry": Connect with OpenNetworkConnection
- `171ca77` estimatefee / estimatepriority RPC methods
- `b750cf1` Remove cli functionality from starwelsd

+ 4
- 4
doc/release-notes/release-notes-0.12.0.md Ver arquivo

@@ -410,9 +410,9 @@ arbitrary TCP connections inside SSL. On e.g. Ubuntu it can be installed with:

sudo apt-get install stunnel4

Then, to tunnel a SSL connection on 28332 to a RPC server bound on localhost on port 18332 do:
Then, to tunnel a SSL connection on 28352 to a RPC server bound on localhost on port 18352 do:

stunnel -d 28332 -r 127.0.0.1:18332 -p stunnel.pem -P ''
stunnel -d 28352 -r 127.0.0.1:18352 -p stunnel.pem -P ''

It can also be set up system-wide in inetd style.

@@ -430,8 +430,8 @@ caching. A sample config for apache2 could look like:
SSLCertificateKeyFile /etc/apache2/ssl/server.key

<Location /starwelsrpc>
ProxyPass http://127.0.0.1:8332/
ProxyPassReverse http://127.0.0.1:8332/
ProxyPass http://127.0.0.1:8352/
ProxyPassReverse http://127.0.0.1:8352/
# optional enable digest auth
# AuthType Digest
# ...

+ 3
- 3
doc/release-notes/release-notes-0.13.1.md Ver arquivo

@@ -159,13 +159,13 @@ For more information about segwit, please see the [segwit FAQ][], the
operator, please see the [versionbits FAQ][] for information about
signaling support for a soft fork.

[Segwit FAQ]: https://localhost/en/2016/01/26/segwit-benefits/
[segwit wallet developers guide]: https://localhost/en/segwit_wallet_dev/
[Segwit FAQ]: https://github.com/starwels/en/2016/01/26/segwit-benefits/
[segwit wallet developers guide]: https://github.com/starwels/en/segwit_wallet_dev/
[BIP141]: https://github.com/starwels/bips/blob/master/bip-0141.mediawiki
[BIP143]: https://github.com/starwels/bips/blob/master/bip-0143.mediawiki
[BIP144]: https://github.com/starwels/bips/blob/master/bip-0144.mediawiki
[BIP145]: https://github.com/starwels/bips/blob/master/bip-0145.mediawiki
[versionbits FAQ]: https://localhost/en/2016/06/08/version-bits-miners-faq/
[versionbits FAQ]: https://github.com/starwels/en/2016/06/08/version-bits-miners-faq/


Null dummy soft fork

+ 2
- 2
doc/release-notes/release-notes-0.14.0.md Ver arquivo

@@ -149,7 +149,7 @@ Some examples:

src/starwels-cli -named help command="help"
src/starwels-cli -named getblockhash height=0
src/starwels-cli -named getblock blockhash=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
src/starwels-cli -named getblock blockhash=000000003d69a915e9da53348c5c272978bb743442e3a6341c11061c125811a2
src/starwels-cli -named sendtoaddress address="(snip)" amount="1.0" subtractfeefromamount=true

The order of arguments doesn't matter in this case. Named arguments are also
@@ -189,7 +189,7 @@ commands such as `prioritisetransaction` so that those changes will not be lost.
Final Alert
-----------

The Alert System was [disabled and deprecated](https://localhost/en/alert/2016-11-01-alert-retirement) in Starwels 0.12.1 and removed in 0.13.0.
The Alert System was [disabled and deprecated](https://github.com/starwels/en/alert/2016-11-01-alert-retirement) in Starwels 0.12.1 and removed in 0.13.0.
The Alert System was retired with a maximum sequence final alert which causes any nodes
supporting the Alert System to display a static hard-coded "Alert Key Compromised" message which also
prevents any other alerts from overriding it. This final alert is hard-coded into this release

+ 2
- 2
doc/release-notes/release-notes-0.15.0.md Ver arquivo

@@ -152,7 +152,7 @@ Starwels 0.15.0 contains the following changes to the RPC interface and `starwel

* When running Starwels with a single wallet, there are **no** changes to the RPC interface or `starwels-cli`. All RPC calls and `starwels-cli` commands continue to work as before.
* When running Starwels with multi-wallet, all *node-level* RPC methods continue to work as before. HTTP RPC requests should be send to the normal `<RPC IP address>:<RPC port>/` endpoint, and `starwels-cli` commands should be run as before. A *node-level* RPC method is any method which does not require access to the wallet.
* When running Starwels with multi-wallet, *wallet-level* RPC methods must specify the wallet for which they're intended in every request. HTTP RPC requests should be send to the `<RPC IP address>:<RPC port>/wallet/<wallet name>/` endpoint, for example `127.0.0.1:8332/wallet/wallet1.dat/`. `starwels-cli` commands should be run with a `-rpcwallet` option, for example `starwels-cli -rpcwallet=wallet1.dat getbalance`.
* When running Starwels with multi-wallet, *wallet-level* RPC methods must specify the wallet for which they're intended in every request. HTTP RPC requests should be send to the `<RPC IP address>:<RPC port>/wallet/<wallet name>/` endpoint, for example `127.0.0.1:8352/wallet/wallet1.dat/`. `starwels-cli` commands should be run with a `-rpcwallet` option, for example `starwels-cli -rpcwallet=wallet1.dat getbalance`.
* A new *node-level* `listwallets` RPC method is added to display which wallets are currently loaded. The names returned by this method are the same as those used in the HTTP endpoint and for the `rpcwallet` argument.

Note that while multi-wallet is now fully supported, the RPC multi-wallet interface should be considered unstable for version 0.15.0, and there may backwards-incompatible changes in future versions.
@@ -740,7 +740,7 @@ Low-level RPC changes
- #10728 `7397af9` fix typo in help text for removeprunedfunds (AkioNak)
- #10193 `6dbcc74` scripted-diff: Remove #include <boost/foreach.hpp> (jtimon)
- #10676 `379aed0` document script-based return fields for validateaddress (instagibbs)
- #10651 `cef4b5c` Verify binaries from localhost and localhost (TheBlueMatt)
- #10651 `cef4b5c` Verify binaries from github.com/starwels and github.com/starwels (TheBlueMatt)
- #10786 `ca4c545` Add PR description to merge commit in github-merge.py (sipa)
- #10812 `c5904e8` [utils] Allow starwels-cli's -rpcconnect option to be used with square brackets (jnewbery)
- #10842 `3895e25` Fix incorrect Doxygen tag (@ince → @since). Doxygen parameter name matching (practicalswift)

+ 1
- 1
doc/release-notes/release-notes-0.3.12.md Ver arquivo

@@ -7,7 +7,7 @@ Features:
* Recovers and continues if an exception is caused by a message you received. Other nodes shouldn't be able to cause an exception, and it hasn't happened before, but if a way is found to cause an exception, this would keep it from being used to stop network nodes.

If you have json-rpc code that checks the contents of the error string, you need to change it to expect error objects of the form {"code":<number>,"message":<string>}, which is the standard. See this thread:
http://localhost/smf/index.php?topic=969.0
http://github.com/starwels/smf/index.php?topic=969.0

Download:
http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.3.12/

+ 1
- 1
doc/release-notes/release-notes-0.3.18.md Ver arquivo

@@ -3,7 +3,7 @@ Changes:
* IsStandard() check to only include known transaction types in blocks
* Jgarzik's optimisation to speed up the initial block download a little

The main addition in this release is the Accounts-Based JSON-RPC commands that Gavin's been working on (more details at http://localhost/smf/index.php?topic=1886.0).
The main addition in this release is the Accounts-Based JSON-RPC commands that Gavin's been working on (more details at http://github.com/starwels/smf/index.php?topic=1886.0).
* getaccountaddress
* sendfrom
* move

+ 1
- 1
doc/release-notes/release-notes-0.7.1.md Ver arquivo

@@ -77,7 +77,7 @@ Bug fixes

* Clicking on a starwels: URI on Windows should now launch Starwels-Qt properly.

* When running -testnet, use RPC port 18332 by default.
* When running -testnet, use RPC port 18352 by default.

* Better detection and handling of corrupt wallet.dat and blkindex.dat files.
Previous versions would crash with a DB_RUNRECOVERY exception, this

+ 1
- 1
doc/release-notes/release-notes-0.8.6.md Ver arquivo

@@ -63,4 +63,4 @@ Warning
Hence it is recommended to use a 64-bit executable if possible.
A 64-bit executable for Windows is planned for 0.9.

Note: Gavin Andresen's GPG signing key for SHA256SUMS.asc has been changed from key id 1FC730C1 to sub key 7BF6E212 (see https://github.com/bitcoin/localhost/pull/279).
Note: Gavin Andresen's GPG signing key for SHA256SUMS.asc has been changed from key id 1FC730C1 to sub key 7BF6E212 (see https://github.com/bitcoin/github.com/starwels/pull/279).

+ 1
- 1
doc/release-notes/release-notes-0.9.4.md Ver arquivo

@@ -25,7 +25,7 @@ various operating system maintainers. Review by Gregory Maxwell determined that
this update is incompatible with the Starwels system and could lead to consensus
forks.

Starwels released binaries from https://localhost are unaffected,
Starwels released binaries from https://github.com/starwels are unaffected,
as are any built with the gitian deterministic build system.

However, if you are running either

+ 10
- 10
doc/release-process.md Ver arquivo

@@ -251,7 +251,7 @@ The `*-debug*` files generated by the gitian build contain debug symbols
for troubleshooting by developers. It is assumed that anyone that is interested
in debugging can run gitian to generate the files for themselves. To avoid
end-user confusion about which file to pick, as well as save storage
space *do not upload these to the localhost server, nor put them in the torrent*.
space *do not upload these to the github.com/starwels server, nor put them in the torrent*.

- GPG-sign it, delete the unsigned file:
```
@@ -261,7 +261,7 @@ rm SHA256SUMS
(the digest algorithm is forced to sha256 to avoid confusion of the `Hash:` header that GPG adds with the SHA256 used for the files)
Note: check that SHA256SUMS itself doesn't end up in SHA256SUMS, which is a spurious/nonsensical entry.

- Upload zips and installers, as well as `SHA256SUMS.asc` from last step, to the localhost server
- Upload zips and installers, as well as `SHA256SUMS.asc` from last step, to the github.com/starwels server
into `/var/www/bin/starwels-${VERSION}`

- A `.torrent` will appear in the directory after a few minutes. Optionally help seed this torrent. To get the `magnet:` URI use:
@@ -269,21 +269,21 @@ Note: check that SHA256SUMS itself doesn't end up in SHA256SUMS, which is a spur
transmission-show -m <torrent file>
```
Insert the magnet URI into the announcement sent to mailing lists. This permits
people without access to `localhost` to download the binary distribution.
people without access to `github.com/starwels` to download the binary distribution.
Also put it into the `optional_magnetlink:` slot in the YAML file for
localhost (see below for localhost update instructions).
github.com/starwels (see below for github.com/starwels update instructions).

- Update localhost version
- Update github.com/starwels version

- First, check to see if the localhost maintainers have prepared a
release: https://github.com/starwels-dot-org/localhost/labels/Releases
- First, check to see if the github.com/starwels maintainers have prepared a
release: https://github.com/starwels-dot-org/github.com/starwels/labels/Releases

- If they have, it will have previously failed their Travis CI
checks because the final release files weren't uploaded.
Trigger a Travis CI rebuild---if it passes, merge.

- If they have not prepared a release, follow the localhost release
instructions: https://github.com/starwels-dot-org/localhost#release-notes
- If they have not prepared a release, follow the github.com/starwels release
instructions: https://github.com/starwels-dot-org/github.com/starwels#release-notes

- After the pull request is merged, the website will automatically show the newest version within 15 minutes, as well
as update the OS download links. Ping @saivann/@harding (saivann/harding on Freenode) in case anything goes wrong
@@ -294,7 +294,7 @@ localhost (see below for localhost update instructions).

- Starwels announcements list https://bitcoincore.org/en/list/announcements/join/

- localhost blog post
- github.com/starwels blog post

- Update title of #bitcoin on Freenode IRC


+ 4
- 4
doc/tor.md Ver arquivo

@@ -42,11 +42,11 @@ reachable from the Tor network. Add these lines to your /etc/tor/torrc (or equiv
config file):

HiddenServiceDir /var/lib/tor/starwels-service/
HiddenServicePort 8333 127.0.0.1:8333
HiddenServicePort 18333 127.0.0.1:18333
HiddenServicePort 8353 127.0.0.1:8353
HiddenServicePort 18353 127.0.0.1:18353

The directory can be different of course, but (both) port numbers should be equal to
your starwelsd's P2P listen port (8333 by default).
your starwelsd's P2P listen port (8353 by default).

-externalip=X You can tell starwels about its publicly reachable address using
this option, and this can be a .onion address. Given the above
@@ -81,7 +81,7 @@ as well, use `discover` instead:

./starwelsd ... -discover

and open port 8333 on your firewall (or use -upnp).
and open port 8353 on your firewall (or use -upnp).

If you only want to use Tor to reach onion addresses, but not use it as a proxy
for normal IPv4/IPv6 communication, use:

+ 1
- 1
doc/zmq.md Ver arquivo

@@ -66,7 +66,7 @@ address. The same address can be used in more than one notification.

For instance:

$ starwelsd -zmqpubhashtx=tcp://127.0.0.1:28332 \
$ starwelsd -zmqpubhashtx=tcp://127.0.0.1:28352 \
-zmqpubrawtx=ipc:///tmp/starwelsd.tx.raw

Each PUB notification has a topic and body, where the header

BIN
share/pixmaps/nsis-header.bmp Ver arquivo


BIN
share/pixmaps/nsis-wizard.bmp Ver arquivo


+ 2
- 2
share/qt/Info.plist.in Ver arquivo

@@ -30,7 +30,7 @@

<key>CFBundleExecutable</key>
<string>Starwels-Qt</string>
<key>CFBundleName</key>
<string>Starwels-Qt</string>

@@ -99,7 +99,7 @@

<key>LSAppNapIsDisabled</key>
<string>True</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.finance</string>
</dict>

+ 33
- 64
src/chainparams.cpp Ver arquivo

@@ -35,21 +35,10 @@ static CBlock CreateGenesisBlock(const char* pszTimestamp, const CScript& genesi
return genesis;
}

/**
* Build the genesis block. Note that the output of its generation
* transaction cannot be spent since it did not originally exist in the
* database.
*
* CBlock(hash=000000000019d6, ver=1, hashPrevBlock=00000000000000, hashMerkleRoot=4a5e1e, nTime=1231006505, nBits=1d00ffff, nNonce=2083236893, vtx=1)
* CTransaction(hash=4a5e1e, ver=1, vin.size=1, vout.size=1, nLockTime=0)
* CTxIn(COutPoint(000000, -1), coinbase 04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73)
* CTxOut(nValue=50.00000000, scriptPubKey=0x5F1DF16B2B704C8A578D0B)
* vMerkleTree: 4a5e1e
*/
static CBlock CreateGenesisBlock(uint32_t nTime, uint32_t nNonce, uint32_t nBits, int32_t nVersion, const CAmount& genesisReward)
{
const char* pszTimestamp = "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks";
const CScript genesisOutputScript = CScript() << ParseHex("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f") << OP_CHECKSIG;
const char* pszTimestamp = "January/20/2017 45th President of the United States of America Donald Trump";
const CScript genesisOutputScript = CScript() << ParseHex("04ea1e6e7cace7b63b88949a3f43f0144b0032eaa9ee6c9627fc58bfb51163a262542fd8cdd3cc40186a1aeeb4857c15954e6f15f789bfdcf9cec59863cdfc6e14") << OP_CHECKSIG;
return CreateGenesisBlock(pszTimestamp, genesisOutputScript, nTime, nNonce, nBits, nVersion, genesisReward);
}

@@ -76,9 +65,9 @@ public:
strNetworkID = "main";
consensus.nSubsidyHalvingInterval = 210000;
consensus.BIP34Height = 227931;
consensus.BIP34Hash = uint256S("0x000000000000024b89b42a942fe0d9fea3bb44ab7bd1b19115dd6a759c0808b8");
consensus.BIP65Height = 388381; // 000000000000000004c2b624ed5d7756c508d90fd0da2c7c679febfa6c4735f0
consensus.BIP66Height = 363725; // 00000000000000000379eaa19dce8c9b722d46ae6a57c2f1a988119488b50931
consensus.BIP34Hash = uint256S("0x00");
consensus.BIP65Height = 388381;
consensus.BIP66Height = 363725;
consensus.powLimit = uint256S("00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
consensus.nPowTargetTimespan = 14 * 24 * 60 * 60; // two weeks
consensus.nPowTargetSpacing = 10 * 60;
@@ -101,10 +90,10 @@ public:
consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout = 1510704000; // November 15th, 2017.

// The best chain should have at least this much work.
consensus.nMinimumChainWork = uint256S("0x000000000000000000000000000000000000000000723d3581fe1bd55373540a");
consensus.nMinimumChainWork = uint256S("0x000000000000000000000000000000000000000000000000000010c410c410c4");

// By default assume that the signatures in ancestors of this block are valid.
consensus.defaultAssumeValid = uint256S("0x0000000000000000003b9ce759c2a087d52abc4266f8f4ebd6d768b89defa50a"); //477890
consensus.defaultAssumeValid = uint256S("0x0000000002a47ec40e87c18501786717cbebb96efa3bb05505e1c24cce51689e"); //4096

/**
* The message start string is designed to be unlikely to occur in normal data.
@@ -115,21 +104,15 @@ public:
pchMessageStart[1] = 0xbe;
pchMessageStart[2] = 0xb4;
pchMessageStart[3] = 0xd9;
nDefaultPort = 8333;
nDefaultPort = 8353;
nPruneAfterHeight = 100000;

genesis = CreateGenesisBlock(1231006505, 2083236893, 0x1d00ffff, 1, 50 * COIN);
genesis = CreateGenesisBlock(1484870400, 2121032621, 0x1d00ffff, 1, 50 * COIN);
consensus.hashGenesisBlock = genesis.GetHash();
assert(consensus.hashGenesisBlock == uint256S("0x000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f"));
assert(genesis.hashMerkleRoot == uint256S("0x4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b"));
assert(consensus.hashGenesisBlock == uint256S("0x000000003d69a915e9da53348c5c272978bb743442e3a6341c11061c125811a2"));
assert(genesis.hashMerkleRoot == uint256S("0x7e2c59b1404833991962e7e6d95a1d4f81f03fffeaf79c0d25d97d24182db485"));

// Note that of those with the service bits flag, most only support a subset of possible options
vSeeds.emplace_back("seed.bitcoin.sipa.be", true); // Pieter Wuille, only supports x1, x5, x9, and xd
vSeeds.emplace_back("dnsseed.bluematt.me", true); // Matt Corallo, only supports x9
vSeeds.emplace_back("dnsseed.starwels.dashjr.org", false); // Luke Dashjr
vSeeds.emplace_back("seed.bitcoinstats.com", true); // Christian Decker, supports x1 - xf
vSeeds.emplace_back("seed.bitcoin.jonasschnelli.ch", true); // Jonas Schnelli, only supports x1, x5, x9, and xd
vSeeds.emplace_back("seed.mai.petertodd.org", true); // Peter Todd, only supports x1, x5, x9, and xd

base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,0);
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,5);
@@ -145,26 +128,15 @@ public:

checkpointData = (CCheckpointData) {
{
{ 11111, uint256S("0x0000000069e244f73d78e8fd29ba2fd2ed618bd6fa2ee92559f542fdb26e7c1d")},
{ 33333, uint256S("0x000000002dd5588a74784eaa7ab0507a18ad16a236e7b1ce69f00d7ddfb5d0a6")},
{ 74000, uint256S("0x0000000000573993a3c9e41ce34471c079dcf5f52a0e824a81e7f953b8661a20")},
{105000, uint256S("0x00000000000291ce28027faea320c8d2b054b2e0fe44a773f3eefb151d6bdc97")},
{134444, uint256S("0x00000000000005b12ffd4cd315cd34ffd4a594f430ac814c91184a0d42d2b0fe")},
{168000, uint256S("0x000000000000099e61ea72015e79632f216fe6cb33d7899acb35b75c8303b763")},
{193000, uint256S("0x000000000000059f452a5f7340de6682a977387c17010ff6e6c3bd83ca8b1317")},
{210000, uint256S("0x000000000000048b95347e83192f69cf0366076336c639f9b7228e9ba171342e")},
{216116, uint256S("0x00000000000001b4f4b433e81ee46494af945cf96014816a4e2370f11b23df4e")},
{225430, uint256S("0x00000000000001c108384350f74090433e7fcf79a606b8e797f065b130575932")},
{250000, uint256S("0x000000000000003887df1f29024b06fc2200b55f8af8f35453d7be294df2d214")},
{279000, uint256S("0x0000000000000001ae8c72a0b0c301f67e3afca10e819efa9041e458e9bd7e40")},
{295000, uint256S("0x00000000000000004d9b4ef50f0f9d686fd69db2e03af35a100370c64632a983")},
{1024, uint256S("0x00000000fb559851169e0d915093533d31af0d963e06a7d80a20496f9cfd2b9f")},
{2048, uint256S("0x00000000a753b360bb5d54908378d999132fbeb415279ef530b397ae249cbef4")},
}
};

chainTxData = ChainTxData{
// Data as of block 000000000000000000d97e53664d17967bd4ee50b23abb92e54a34eb222d15ae (height 478913).
1501801925, // * UNIX timestamp of last known number of transactions
243756039, // * total number of transactions between genesis and that timestamp
// Data as of block 0000000002a47ec40e87c18501786717cbebb96efa3bb05505e1c24cce51689e (height 4096).
1517574356, // * UNIX timestamp of last known number of transactions
4172, // * total number of transactions between genesis and that timestamp
// (the tx=... number in the SetBestChain debug.log lines)
3.1 // * estimated number of transactions per second after that timestamp
};
@@ -180,9 +152,9 @@ public:
strNetworkID = "test";
consensus.nSubsidyHalvingInterval = 210000;
consensus.BIP34Height = 21111;
consensus.BIP34Hash = uint256S("0x0000000023b3a96d3484e5abb3755c413e7d41500f8e2a5c3f0dd01299cd8ef8");
consensus.BIP65Height = 581885; // 00000000007f6655f22f98e72ed80d8b06dc761d5da09df0fa1dc4be4f861eb6
consensus.BIP66Height = 330776; // 000000002104c8c45e99a8853285a3b592602a3ccde2b832481da85e9e4ba182
consensus.BIP34Hash = uint256S("0x00");
consensus.BIP65Height = 581885;
consensus.BIP66Height = 330776;
consensus.powLimit = uint256S("00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
consensus.nPowTargetTimespan = 14 * 24 * 60 * 60; // two weeks
consensus.nPowTargetSpacing = 10 * 60;
@@ -205,29 +177,26 @@ public:
consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout = 1493596800; // May 1st 2017

// The best chain should have at least this much work.
consensus.nMinimumChainWork = uint256S("0x00000000000000000000000000000000000000000000002830dab7f76dbb7d63");
consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000000000000020102010201");

// By default assume that the signatures in ancestors of this block are valid.
consensus.defaultAssumeValid = uint256S("0x0000000002e9e7b00e1f6dc5123a04aad68dd0f0968d8c7aa45f6640795c37b1"); //1135275
consensus.defaultAssumeValid = uint256S("0x00000000bf9f221b2acc9bd6ae001ccd5640615a5e4d9ed94bbb3564d3e372bd"); //512

pchMessageStart[0] = 0x0b;
pchMessageStart[1] = 0x11;
pchMessageStart[2] = 0x09;
pchMessageStart[3] = 0x07;
nDefaultPort = 18333;
nDefaultPort = 18353;
nPruneAfterHeight = 1000;

genesis = CreateGenesisBlock(1296688602, 414098458, 0x1d00ffff, 1, 50 * COIN);
genesis = CreateGenesisBlock(1484956800, 2266491446, 0x1d00ffff, 1, 50 * COIN);
consensus.hashGenesisBlock = genesis.GetHash();
assert(consensus.hashGenesisBlock == uint256S("0x000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943"));
assert(genesis.hashMerkleRoot == uint256S("0x4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b"));
assert(consensus.hashGenesisBlock == uint256S("0x00000000c5a2df98ed0b29d576af8b99b3c6b65052614da34292aa4a109b3004"));
assert(genesis.hashMerkleRoot == uint256S("0x7e2c59b1404833991962e7e6d95a1d4f81f03fffeaf79c0d25d97d24182db485"));

vFixedSeeds.clear();
vSeeds.clear();
// nodes with support for servicebits filtering should be at the top
vSeeds.emplace_back("testnet-seed.bitcoin.jonasschnelli.ch", true);
vSeeds.emplace_back("seed.tmai.petertodd.org", true);
vSeeds.emplace_back("testnet-seed.bluematt.me", false);

base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,111);
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,196);
@@ -244,14 +213,14 @@ public:

checkpointData = (CCheckpointData) {
{
{546, uint256S("000000002a936ca763904c3c35fce2f3556c559c0214345d31b1bcebf76acb70")},
{256, uint256S("00000000284f483ce4d56f4f1a026363d2d0daf2c18f77cd5e8969166ca16212")},
}
};

chainTxData = ChainTxData{
// Data as of block 00000000000001c200b9790dc637d3bb141fe77d155b966ed775b17e109f7c6c (height 1156179)
1501802953,
14706531,
// Data as of block 00000000bf9f221b2acc9bd6ae001ccd5640615a5e4d9ed94bbb3564d3e372bd (height 512)
1518787878,
536,
0.15
};

@@ -300,10 +269,10 @@ public:
nDefaultPort = 18444;
nPruneAfterHeight = 1000;

genesis = CreateGenesisBlock(1296688602, 2, 0x207fffff, 1, 50 * COIN);
genesis = CreateGenesisBlock(1484956800, 0, 0x207fffff, 1, 50 * COIN);
consensus.hashGenesisBlock = genesis.GetHash();
assert(consensus.hashGenesisBlock == uint256S("0x0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206"));
assert(genesis.hashMerkleRoot == uint256S("0x4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b"));
assert(consensus.hashGenesisBlock == uint256S("0x79a6a4d5e19d4e5c6783691ba9ad75c7c352f906275b93dcad27ea0c3017ec80"));
assert(genesis.hashMerkleRoot == uint256S("0x7e2c59b1404833991962e7e6d95a1d4f81f03fffeaf79c0d25d97d24182db485"));

vFixedSeeds.clear(); //!< Regtest mode doesn't have any fixed seeds.
vSeeds.clear(); //!< Regtest mode doesn't have any DNS seeds.
@@ -314,7 +283,7 @@ public:

checkpointData = (CCheckpointData) {
{
{0, uint256S("0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206")},
{0, uint256S("79a6a4d5e19d4e5c6783691ba9ad75c7c352f906275b93dcad27ea0c3017ec80")},
}
};


+ 3
- 3
src/chainparamsbase.cpp Ver arquivo

@@ -32,7 +32,7 @@ class CBaseMainParams : public CBaseChainParams
public:
CBaseMainParams()
{
nRPCPort = 8332;
nRPCPort = 8352;
}
};

@@ -44,7 +44,7 @@ class CBaseTestNetParams : public CBaseChainParams
public:
CBaseTestNetParams()
{
nRPCPort = 18332;
nRPCPort = 18352;
strDataDir = "testnet3";
}
};
@@ -57,7 +57,7 @@ class CBaseRegTestParams : public CBaseChainParams
public:
CBaseRegTestParams()
{
nRPCPort = 18332;
nRPCPort = 18352;
strDataDir = "regtest";
}
};

+ 4
- 1457
src/chainparamsseeds.h
Diferenças do arquivo suprimidas por serem muito extensas
Ver arquivo


+ 1
- 1
src/clientversion.cpp Ver arquivo

@@ -13,7 +13,7 @@
* for both starwelsd and starwels, to make it harder for attackers to
* target servers or GUI users specifically.
*/
const std::string CLIENT_NAME("Satoshi");
const std::string CLIENT_NAME("root");

/**
* Client version number

+ 1
- 1
src/init.cpp Ver arquivo

@@ -528,7 +528,7 @@ std::string HelpMessage(HelpMessageMode mode)
std::string LicenseInfo()
{
const std::string URL_SOURCE_CODE = "<https://github.com/starwels/starwels>";
const std::string URL_WEBSITE = "<https://localhost>";
const std::string URL_WEBSITE = "<https://github.com/starwels>";

return CopyrightHolders(strprintf(_("Copyright (C) %i-%i"), 2009, COPYRIGHT_YEAR) + " ") + "\n" +
"\n" +

+ 21
- 21
src/protocol.h Ver arquivo

@@ -71,100 +71,100 @@ namespace NetMsgType {
/**
* The version message provides information about the transmitting node to the
* receiving node at the beginning of a connection.
* @see https://localhost/en/developer-reference#version
* @see https://github.com/starwels/en/developer-reference#version
*/
extern const char *VERSION;
/**
* The verack message acknowledges a previously-received version message,
* informing the connecting node that it can begin to send other messages.
* @see https://localhost/en/developer-reference#verack
* @see https://github.com/starwels/en/developer-reference#verack
*/
extern const char *VERACK;
/**
* The addr (IP address) message relays connection information for peers on the
* network.
* @see https://localhost/en/developer-reference#addr
* @see https://github.com/starwels/en/developer-reference#addr
*/
extern const char *ADDR;
/**
* The inv message (inventory message) transmits one or more inventories of
* objects known to the transmitting peer.
* @see https://localhost/en/developer-reference#inv
* @see https://github.com/starwels/en/developer-reference#inv
*/
extern const char *INV;
/**
* The getdata message requests one or more data objects from another node.
* @see https://localhost/en/developer-reference#getdata
* @see https://github.com/starwels/en/developer-reference#getdata
*/
extern const char *GETDATA;
/**
* The merkleblock message is a reply to a getdata message which requested a
* block using the inventory type MSG_MERKLEBLOCK.
* @since protocol version 70001 as described by BIP37.
* @see https://localhost/en/developer-reference#merkleblock
* @see https://github.com/starwels/en/developer-reference#merkleblock
*/
extern const char *MERKLEBLOCK;
/**
* The getblocks message requests an inv message that provides block header
* hashes starting from a particular point in the block chain.
* @see https://localhost/en/developer-reference#getblocks
* @see https://github.com/starwels/en/developer-reference#getblocks
*/
extern const char *GETBLOCKS;
/**
* The getheaders message requests a headers message that provides block
* headers starting from a particular point in the block chain.
* @since protocol version 31800.
* @see https://localhost/en/developer-reference#getheaders
* @see https://github.com/starwels/en/developer-reference#getheaders
*/
extern const char *GETHEADERS;
/**
* The tx message transmits a single transaction.
* @see https://localhost/en/developer-reference#tx
* @see https://github.com/starwels/en/developer-reference#tx
*/
extern const char *TX;
/**
* The headers message sends one or more block headers to a node which
* previously requested certain headers with a getheaders message.
* @since protocol version 31800.
* @see https://localhost/en/developer-reference#headers
* @see https://github.com/starwels/en/developer-reference#headers
*/
extern const char *HEADERS;
/**
* The block message transmits a single serialized block.
* @see https://localhost/en/developer-reference#block
* @see https://github.com/starwels/en/developer-reference#block
*/
extern const char *BLOCK;
/**
* The getaddr message requests an addr message from the receiving node,
* preferably one with lots of IP addresses of other receiving nodes.
* @see https://localhost/en/developer-reference#getaddr
* @see https://github.com/starwels/en/developer-reference#getaddr
*/
extern const char *GETADDR;
/**
* The mempool message requests the TXIDs of transactions that the receiving
* node has verified as valid but which have not yet appeared in a block.
* @since protocol version 60002.
* @see https://localhost/en/developer-reference#mempool
* @see https://github.com/starwels/en/developer-reference#mempool
*/
extern const char *MEMPOOL;
/**
* The ping message is sent periodically to help confirm that the receiving
* peer is still connected.
* @see https://localhost/en/developer-reference#ping
* @see https://github.com/starwels/en/developer-reference#ping
*/
extern const char *PING;
/**
* The pong message replies to a ping message, proving to the pinging node that
* the ponging node is still alive.
* @since protocol version 60001 as described by BIP31.
* @see https://localhost/en/developer-reference#pong
* @see https://github.com/starwels/en/developer-reference#pong
*/
extern const char *PONG;
/**
* The notfound message is a reply to a getdata message which requested an
* object the receiving node does not have available for relay.
* @since protocol version 70001.
* @see https://localhost/en/developer-reference#notfound
* @see https://github.com/starwels/en/developer-reference#notfound
*/
extern const char *NOTFOUND;
/**
@@ -173,7 +173,7 @@ extern const char *NOTFOUND;
* @since protocol version 70001 as described by BIP37.
* Only available with service bit NODE_BLOOM since protocol version
* 70011 as described by BIP111.
* @see https://localhost/en/developer-reference#filterload
* @see https://github.com/starwels/en/developer-reference#filterload
*/
extern const char *FILTERLOAD;
/**
@@ -182,7 +182,7 @@ extern const char *FILTERLOAD;
* @since protocol version 70001 as described by BIP37.
* Only available with service bit NODE_BLOOM since protocol version
* 70011 as described by BIP111.
* @see https://localhost/en/developer-reference#filteradd
* @see https://github.com/starwels/en/developer-reference#filteradd
*/
extern const char *FILTERADD;
/**
@@ -191,21 +191,21 @@ extern const char *FILTERADD;
* @since protocol version 70001 as described by BIP37.
* Only available with service bit NODE_BLOOM since protocol version
* 70011 as described by BIP111.
* @see https://localhost/en/developer-reference#filterclear
* @see https://github.com/starwels/en/developer-reference#filterclear
*/
extern const char *FILTERCLEAR;
/**
* The reject message informs the receiving node that one of its previous
* messages has been rejected.
* @since protocol version 70002 as described by BIP61.
* @see https://localhost/en/developer-reference#reject
* @see https://github.com/starwels/en/developer-reference#reject
*/
extern const char *REJECT;
/**
* Indicates that a node prefers to receive new block announcements via a
* "headers" message rather than an "inv".
* @since protocol version 70012 as described by BIP130.
* @see https://localhost/en/developer-reference#sendheaders
* @see https://github.com/starwels/en/developer-reference#sendheaders
*/
extern const char *SENDHEADERS;
/**

+ 1
- 1
src/qt/guiconstants.h Ver arquivo

@@ -49,7 +49,7 @@ static const int MAX_URI_LENGTH = 255;
#define SPINNER_FRAMES 36

#define QAPP_ORG_NAME "Starwels"
#define QAPP_ORG_DOMAIN "localhost"
#define QAPP_ORG_DOMAIN "github.com/starwels"
#define QAPP_APP_NAME_DEFAULT "Starwels-Qt"
#define QAPP_APP_NAME_TESTNET "Starwels-Qt-testnet"


+ 1
- 1
src/qt/intro.cpp Ver arquivo

@@ -22,7 +22,7 @@

static const uint64_t GB_BYTES = 1000000000LL;
/* Minimum free space (in GB) needed for data directory */
static const uint64_t BLOCK_CHAIN_SIZE = 150;
static const uint64_t BLOCK_CHAIN_SIZE = 1;
/* Minimum free space (in GB) needed for data directory when pruned; Does not include prune target */
static const uint64_t CHAIN_STATE_SIZE = 3;
/* Total required space (in GB) depending on user choice (prune, not prune) */

+ 1
- 1
src/qt/test/rpcnestedtests.cpp Ver arquivo

@@ -73,7 +73,7 @@ void RPCNestedTests::rpcNestedTests()
QVERIFY(result == result2);

RPCConsole::RPCExecuteCommandLine(result, "getblock(getbestblockhash())[tx][0]", &filtered);
QVERIFY(result == "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b");
QVERIFY(result == "7e2c59b1404833991962e7e6d95a1d4f81f03fffeaf79c0d25d97d24182db485");
QVERIFY(filtered == "getblock(getbestblockhash())[tx][0]");

RPCConsole::RPCParseCommandLine(result, "importprivkey", false, &filtered);

+ 5
- 5
src/rpc/net.cpp Ver arquivo

@@ -205,8 +205,8 @@ UniValue addnode(const JSONRPCRequest& request)
"1. \"node\" (string, required) The node (see getpeerinfo for nodes)\n"
"2. \"command\" (string, required) 'add' to add a node to the list, 'remove' to remove a node from the list, 'onetry' to try a connection to the node once\n"
"\nExamples:\n"
+ HelpExampleCli("addnode", "\"192.168.0.6:8333\" \"onetry\"")
+ HelpExampleRpc("addnode", "\"192.168.0.6:8333\", \"onetry\"")
+ HelpExampleCli("addnode", "\"192.168.0.6:8353\" \"onetry\"")
+ HelpExampleRpc("addnode", "\"192.168.0.6:8353\", \"onetry\"")
);

if(!g_connman)
@@ -247,9 +247,9 @@ UniValue disconnectnode(const JSONRPCRequest& request)
"1. \"address\" (string, optional) The IP address/port of the node\n"
"2. \"nodeid\" (number, optional) The node ID (see getpeerinfo for node IDs)\n"
"\nExamples:\n"
+ HelpExampleCli("disconnectnode", "\"192.168.0.6:8333\"")
+ HelpExampleCli("disconnectnode", "\"192.168.0.6:8353\"")
+ HelpExampleCli("disconnectnode", "\"\" 1")
+ HelpExampleRpc("disconnectnode", "\"192.168.0.6:8333\"")
+ HelpExampleRpc("disconnectnode", "\"192.168.0.6:8353\"")
+ HelpExampleRpc("disconnectnode", "\"\", 1")
);

@@ -294,7 +294,7 @@ UniValue getaddednodeinfo(const JSONRPCRequest& request)
" \"connected\" : true|false, (boolean) If connected\n"
" \"addresses\" : [ (list of objects) Only when connected = true\n"
" {\n"
" \"address\" : \"192.168.0.201:8333\", (string) The starwels server IP and port we're connected to\n"
" \"address\" : \"192.168.0.201:8353\", (string) The starwels server IP and port we're connected to\n"
" \"connected\" : \"outbound\" (string) connection, inbound or outbound\n"
" }\n"
" ]\n"

+ 1
- 1
src/rpc/server.cpp Ver arquivo

@@ -519,7 +519,7 @@ std::string HelpExampleCli(const std::string& methodname, const std::string& arg
std::string HelpExampleRpc(const std::string& methodname, const std::string& args)
{
return "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", "
"\"method\": \"" + methodname + "\", \"params\": [" + args + "] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/\n";
"\"method\": \"" + methodname + "\", \"params\": [" + args + "] }' -H 'content-type: text/plain;' http://127.0.0.1:8352/\n";
}

void RPCSetTimerInterfaceIfUnset(RPCTimerInterface *iface)

+ 1
- 1
src/starwelsd.cpp Ver arquivo

@@ -30,7 +30,7 @@
*
* \section intro_sec Introduction
*
* This is the developer documentation of the reference client for an experimental new digital currency called Starwels (https://localhost/),
* This is the developer documentation of the reference client for an experimental new digital currency called Starwels (https://github.com/starwels/),
* which enables instant payments to anyone, anywhere in the world. Starwels uses peer-to-peer technology to operate
* with no central authority: managing transactions and issuing money are carried out collectively by the network.
*

+ 35
- 35
src/test/addrman_tests.cpp Ver arquivo

@@ -92,15 +92,15 @@ BOOST_AUTO_TEST_CASE(addrman_simple)
BOOST_CHECK_EQUAL(addr_null.ToString(), "[::]:0");

// Test: Does Addrman::Add work as expected.
CService addr1 = ResolveService("250.1.1.1", 8333);
CService addr1 = ResolveService("250.1.1.1", 8353);
BOOST_CHECK(addrman.Add(CAddress(addr1, NODE_NONE), source));
BOOST_CHECK_EQUAL(addrman.size(), 1);
CAddrInfo addr_ret1 = addrman.Select();
BOOST_CHECK_EQUAL(addr_ret1.ToString(), "250.1.1.1:8333");
BOOST_CHECK_EQUAL(addr_ret1.ToString(), "250.1.1.1:8353");

// Test: Does IP address deduplication work correctly.
// Expected dup IP should not be added.
CService addr1_dup = ResolveService("250.1.1.1", 8333);
CService addr1_dup = ResolveService("250.1.1.1", 8353);
BOOST_CHECK(!addrman.Add(CAddress(addr1_dup, NODE_NONE), source));
BOOST_CHECK_EQUAL(addrman.size(), 1);

@@ -111,7 +111,7 @@ BOOST_AUTO_TEST_CASE(addrman_simple)
// hash collisions may occur. But we can always be sure of at least one
// success.

CService addr2 = ResolveService("250.1.1.2", 8333);
CService addr2 = ResolveService("250.1.1.2", 8353);
BOOST_CHECK(addrman.Add(CAddress(addr2, NODE_NONE), source));
BOOST_CHECK(addrman.size() >= 1);

@@ -123,8 +123,8 @@ BOOST_AUTO_TEST_CASE(addrman_simple)

// Test: AddrMan::Add multiple addresses works as expected
std::vector<CAddress> vAddr;
vAddr.push_back(CAddress(ResolveService("250.1.1.3", 8333), NODE_NONE));
vAddr.push_back(CAddress(ResolveService("250.1.1.4", 8333), NODE_NONE));
vAddr.push_back(CAddress(ResolveService("250.1.1.3", 8353), NODE_NONE));
vAddr.push_back(CAddress(ResolveService("250.1.1.4", 8353), NODE_NONE));
BOOST_CHECK(addrman.Add(vAddr, source));
BOOST_CHECK(addrman.size() >= 1);
}
@@ -138,7 +138,7 @@ BOOST_AUTO_TEST_CASE(addrman_ports)
BOOST_CHECK_EQUAL(addrman.size(), 0);

// Test 7; Addr with same IP but diff port does not replace existing addr.
CService addr1 = ResolveService("250.1.1.1", 8333);
CService addr1 = ResolveService("250.1.1.1", 8353);
addrman.Add(CAddress(addr1, NODE_NONE), source);
BOOST_CHECK_EQUAL(addrman.size(), 1);

@@ -146,7 +146,7 @@ BOOST_AUTO_TEST_CASE(addrman_ports)
addrman.Add(CAddress(addr1_port, NODE_NONE), source);
BOOST_CHECK_EQUAL(addrman.size(), 1);
CAddrInfo addr_ret2 = addrman.Select();
BOOST_CHECK_EQUAL(addr_ret2.ToString(), "250.1.1.1:8333");
BOOST_CHECK_EQUAL(addr_ret2.ToString(), "250.1.1.1:8353");

// Test: Add same IP but diff port to tried table, it doesn't get added.
// Perhaps this is not ideal behavior but it is the current behavior.
@@ -154,7 +154,7 @@ BOOST_AUTO_TEST_CASE(addrman_ports)
BOOST_CHECK_EQUAL(addrman.size(), 1);
bool newOnly = true;
CAddrInfo addr_ret3 = addrman.Select(newOnly);
BOOST_CHECK_EQUAL(addr_ret3.ToString(), "250.1.1.1:8333");
BOOST_CHECK_EQUAL(addr_ret3.ToString(), "250.1.1.1:8353");
}


@@ -165,13 +165,13 @@ BOOST_AUTO_TEST_CASE(addrman_select)
CNetAddr source = ResolveIP("252.2.2.2");

// Test: Select from new with 1 addr in new.
CService addr1 = ResolveService("250.1.1.1", 8333);
CService addr1 = ResolveService("250.1.1.1", 8353);
addrman.Add(CAddress(addr1, NODE_NONE), source);
BOOST_CHECK_EQUAL(addrman.size(), 1);

bool newOnly = true;
CAddrInfo addr_ret1 = addrman.Select(newOnly);
BOOST_CHECK_EQUAL(addr_ret1.ToString(), "250.1.1.1:8333");
BOOST_CHECK_EQUAL(addr_ret1.ToString(), "250.1.1.1:8353");

// Test: move addr to tried, select from new expected nothing returned.
addrman.Good(CAddress(addr1, NODE_NONE));
@@ -180,30 +180,30 @@ BOOST_AUTO_TEST_CASE(addrman_select)
BOOST_CHECK_EQUAL(addr_ret2.ToString(), "[::]:0");

CAddrInfo addr_ret3 = addrman.Select();
BOOST_CHECK_EQUAL(addr_ret3.ToString(), "250.1.1.1:8333");
BOOST_CHECK_EQUAL(addr_ret3.ToString(), "250.1.1.1:8353");

BOOST_CHECK_EQUAL(addrman.size(), 1);


// Add three addresses to new table.
CService addr2 = ResolveService("250.3.1.1", 8333);
CService addr2 = ResolveService("250.3.1.1", 8353);
CService addr3 = ResolveService("250.3.2.2", 9999);
CService addr4 = ResolveService("250.3.3.3", 9999);

addrman.Add(CAddress(addr2, NODE_NONE), ResolveService("250.3.1.1", 8333));
addrman.Add(CAddress(addr3, NODE_NONE), ResolveService("250.3.1.1", 8333));
addrman.Add(CAddress(addr4, NODE_NONE), ResolveService("250.4.1.1", 8333));
addrman.Add(CAddress(addr2, NODE_NONE), ResolveService("250.3.1.1", 8353));
addrman.Add(CAddress(addr3, NODE_NONE), ResolveService("250.3.1.1", 8353));
addrman.Add(CAddress(addr4, NODE_NONE), ResolveService("250.4.1.1", 8353));

// Add three addresses to tried table.
CService addr5 = ResolveService("250.4.4.4", 8333);
CService addr5 = ResolveService("250.4.4.4", 8353);
CService addr6 = ResolveService("250.4.5.5", 7777);
CService addr7 = ResolveService("250.4.6.6", 8333);
CService addr7 = ResolveService("250.4.6.6", 8353);

addrman.Add(CAddress(addr5, NODE_NONE), ResolveService("250.3.1.1", 8333));
addrman.Add(CAddress(addr5, NODE_NONE), ResolveService("250.3.1.1", 8353));
addrman.Good(CAddress(addr5, NODE_NONE));
addrman.Add(CAddress(addr6, NODE_NONE), ResolveService("250.3.1.1", 8333));
addrman.Add(CAddress(addr6, NODE_NONE), ResolveService("250.3.1.1", 8353));
addrman.Good(CAddress(addr6, NODE_NONE));
addrman.Add(CAddress(addr7, NODE_NONE), ResolveService("250.1.1.3", 8333));
addrman.Add(CAddress(addr7, NODE_NONE), ResolveService("250.1.1.3", 8353));
addrman.Good(CAddress(addr7, NODE_NONE));

// Test: 6 addrs + 1 addr from last test = 7.
@@ -276,9 +276,9 @@ BOOST_AUTO_TEST_CASE(addrman_find)

BOOST_CHECK_EQUAL(addrman.size(), 0);

CAddress addr1 = CAddress(ResolveService("250.1.2.1", 8333), NODE_NONE);
CAddress addr1 = CAddress(ResolveService("250.1.2.1", 8353), NODE_NONE);
CAddress addr2 = CAddress(ResolveService("250.1.2.1", 9999), NODE_NONE);
CAddress addr3 = CAddress(ResolveService("251.255.2.1", 8333), NODE_NONE);
CAddress addr3 = CAddress(ResolveService("251.255.2.1", 8353), NODE_NONE);

CNetAddr source1 = ResolveIP("250.1.2.1");
CNetAddr source2 = ResolveIP("250.1.2.2");
@@ -290,7 +290,7 @@ BOOST_AUTO_TEST_CASE(addrman_find)
// Test: ensure Find returns an IP matching what we searched on.
CAddrInfo* info1 = addrman.Find(addr1);
BOOST_REQUIRE(info1);
BOOST_CHECK_EQUAL(info1->ToString(), "250.1.2.1:8333");
BOOST_CHECK_EQUAL(info1->ToString(), "250.1.2.1:8353");

// Test 18; Find does not discriminate by port number.
CAddrInfo* info2 = addrman.Find(addr2);
@@ -300,7 +300,7 @@ BOOST_AUTO_TEST_CASE(addrman_find)
// Test: Find returns another IP matching what we searched on.
CAddrInfo* info3 = addrman.Find(addr3);
BOOST_REQUIRE(info3);
BOOST_CHECK_EQUAL(info3->ToString(), "251.255.2.1:8333");
BOOST_CHECK_EQUAL(info3->ToString(), "251.255.2.1:8353");
}

BOOST_AUTO_TEST_CASE(addrman_create)
@@ -309,17 +309,17 @@ BOOST_AUTO_TEST_CASE(addrman_create)

BOOST_CHECK_EQUAL(addrman.size(), 0);

CAddress addr1 = CAddress(ResolveService("250.1.2.1", 8333), NODE_NONE);
CAddress addr1 = CAddress(ResolveService("250.1.2.1", 8353), NODE_NONE);
CNetAddr source1 = ResolveIP("250.1.2.1");

int nId;
CAddrInfo* pinfo = addrman.Create(addr1, source1, &nId);

// Test: The result should be the same as the input addr.
BOOST_CHECK_EQUAL(pinfo->ToString(), "250.1.2.1:8333");
BOOST_CHECK_EQUAL(pinfo->ToString(), "250.1.2.1:8353");

CAddrInfo* info2 = addrman.Find(addr1);
BOOST_CHECK_EQUAL(info2->ToString(), "250.1.2.1:8333");
BOOST_CHECK_EQUAL(info2->ToString(), "250.1.2.1:8353");
}


@@ -329,7 +329,7 @@ BOOST_AUTO_TEST_CASE(addrman_delete)

BOOST_CHECK_EQUAL(addrman.size(), 0);

CAddress addr1 = CAddress(ResolveService("250.1.2.1", 8333), NODE_NONE);
CAddress addr1 = CAddress(ResolveService("250.1.2.1", 8353), NODE_NONE);
CNetAddr source1 = ResolveIP("250.1.2.1");

int nId;
@@ -353,15 +353,15 @@ BOOST_AUTO_TEST_CASE(addrman_getaddr)
std::vector<CAddress> vAddr1 = addrman.GetAddr();
BOOST_CHECK_EQUAL(vAddr1.size(), 0);

CAddress addr1 = CAddress(ResolveService("250.250.2.1", 8333), NODE_NONE);
CAddress addr1 = CAddress(ResolveService("250.250.2.1", 8353), NODE_NONE);
addr1.nTime = GetAdjustedTime(); // Set time so isTerrible = false
CAddress addr2 = CAddress(ResolveService("250.251.2.2", 9999), NODE_NONE);
addr2.nTime = GetAdjustedTime();
CAddress addr3 = CAddress(ResolveService("251.252.2.3", 8333), NODE_NONE);
CAddress addr3 = CAddress(ResolveService("251.252.2.3", 8353), NODE_NONE);
addr3.nTime = GetAdjustedTime();
CAddress addr4 = CAddress(ResolveService("252.253.3.4", 8333), NODE_NONE);
CAddress addr4 = CAddress(ResolveService("252.253.3.4", 8353), NODE_NONE);
addr4.nTime = GetAdjustedTime();
CAddress addr5 = CAddress(ResolveService("252.254.4.5", 8333), NODE_NONE);
CAddress addr5 = CAddress(ResolveService("252.254.4.5", 8353), NODE_NONE);
addr5.nTime = GetAdjustedTime();
CNetAddr source1 = ResolveIP("250.1.2.1");
CNetAddr source2 = ResolveIP("250.2.3.3");
@@ -408,7 +408,7 @@ BOOST_AUTO_TEST_CASE(caddrinfo_get_tried_bucket)
{
CAddrManTest addrman;

CAddress addr1 = CAddress(ResolveService("250.1.1.1", 8333), NODE_NONE);
CAddress addr1 = CAddress(ResolveService("250.1.1.1", 8353), NODE_NONE);
CAddress addr2 = CAddress(ResolveService("250.1.1.1", 9999), NODE_NONE);

CNetAddr source1 = ResolveIP("250.1.1.1");
@@ -462,7 +462,7 @@ BOOST_AUTO_TEST_CASE(caddrinfo_get_new_bucket)
{
CAddrManTest addrman;

CAddress addr1 = CAddress(ResolveService("250.1.2.1", 8333), NODE_NONE);
CAddress addr1 = CAddress(ResolveService("250.1.2.1", 8353), NODE_NONE);
CAddress addr2 = CAddress(ResolveService("250.1.2.1", 9999), NODE_NONE);

CNetAddr source1 = ResolveIP("250.1.2.1");

+ 1
- 1
src/test/miner_tests.cpp Ver arquivo

@@ -197,7 +197,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
// Note that by default, these tests run with size accounting enabled.
const auto chainParams = CreateChainParams(CBaseChainParams::MAIN);
const CChainParams& chainparams = *chainParams;
CScript scriptPubKey = CScript() << ParseHex("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f") << OP_CHECKSIG;
CScript scriptPubKey = CScript() << ParseHex("04ea1e6e7cace7b63b88949a3f43f0144b0032eaa9ee6c9627fc58bfb51163a262542fd8cdd3cc40186a1aeeb4857c15954e6f15f789bfdcf9cec59863cdfc6e14") << OP_CHECKSIG;
std::unique_ptr<CBlockTemplate> pblocktemplate;
CMutableTransaction tx,tx2;
CScript script;

+ 2
- 2
src/test/net_tests.cpp Ver arquivo

@@ -91,13 +91,13 @@ BOOST_AUTO_TEST_CASE(caddrdb_read)
addrmanUncorrupted.MakeDeterministic();

CService addr1, addr2, addr3;
Lookup("250.7.1.1", addr1, 8333, false);
Lookup("250.7.1.1", addr1, 8353, false);
Lookup("250.7.2.2", addr2, 9999, false);
Lookup("250.7.3.3", addr3, 9999, false);

// Add three addresses to new table.
CService source;
Lookup("252.5.1.1", source, 8333, false);
Lookup("252.5.1.1", source, 8353, false);
addrmanUncorrupted.Add(CAddress(addr1, NODE_NONE), source);
addrmanUncorrupted.Add(CAddress(addr2, NODE_NONE), source);
addrmanUncorrupted.Add(CAddress(addr3, NODE_NONE), source);

+ 9
- 13
src/test/netbase_tests.cpp Ver arquivo

@@ -82,20 +82,16 @@ bool static TestSplitHost(std::string test, std::string host, int port)

BOOST_AUTO_TEST_CASE(netbase_splithost)
{
BOOST_CHECK(TestSplitHost("localhost", "localhost", -1));
BOOST_CHECK(TestSplitHost("[localhost]", "localhost", -1));
BOOST_CHECK(TestSplitHost("localhost:80", "localhost", 80));
BOOST_CHECK(TestSplitHost("[localhost]:80", "localhost", 80));
BOOST_CHECK(TestSplitHost("127.0.0.1", "127.0.0.1", -1));
BOOST_CHECK(TestSplitHost("127.0.0.1:8333", "127.0.0.1", 8333));
BOOST_CHECK(TestSplitHost("127.0.0.1:8353", "127.0.0.1", 8353));
BOOST_CHECK(TestSplitHost("[127.0.0.1]", "127.0.0.1", -1));
BOOST_CHECK(TestSplitHost("[127.0.0.1]:8333", "127.0.0.1", 8333));
BOOST_CHECK(TestSplitHost("[127.0.0.1]:8353", "127.0.0.1", 8353));
BOOST_CHECK(TestSplitHost("::ffff:127.0.0.1", "::ffff:127.0.0.1", -1));
BOOST_CHECK(TestSplitHost("[::ffff:127.0.0.1]:8333", "::ffff:127.0.0.1", 8333));
BOOST_CHECK(TestSplitHost("[::]:8333", "::", 8333));
BOOST_CHECK(TestSplitHost("::8333", "::8333", -1));
BOOST_CHECK(TestSplitHost(":8333", "", 8333));
BOOST_CHECK(TestSplitHost("[]:8333", "", 8333));
BOOST_CHECK(TestSplitHost("[::ffff:127.0.0.1]:8353", "::ffff:127.0.0.1", 8353));
BOOST_CHECK(TestSplitHost("[::]:8353", "::", 8353));
BOOST_CHECK(TestSplitHost("::8353", "::8353", -1));
BOOST_CHECK(TestSplitHost(":8353", "", 8353));
BOOST_CHECK(TestSplitHost("[]:8353", "", 8353));
BOOST_CHECK(TestSplitHost("", "", -1));
}

@@ -108,10 +104,10 @@ bool static TestParse(std::string src, std::string canon)
BOOST_AUTO_TEST_CASE(netbase_lookupnumeric)
{
BOOST_CHECK(TestParse("127.0.0.1", "127.0.0.1:65535"));
BOOST_CHECK(TestParse("127.0.0.1:8333", "127.0.0.1:8333"));
BOOST_CHECK(TestParse("127.0.0.1:8353", "127.0.0.1:8353"));
BOOST_CHECK(TestParse("::ffff:127.0.0.1", "127.0.0.1:65535"));
BOOST_CHECK(TestParse("::", "[::]:65535"));
BOOST_CHECK(TestParse("[::]:8333", "[::]:8333"));
BOOST_CHECK(TestParse("[::]:8353", "[::]:8353"));
BOOST_CHECK(TestParse("[127.0.0.1]", "127.0.0.1:65535"));
BOOST_CHECK(TestParse(":::", "[::]:0"));


+ 2
- 2
src/test/pow_tests.cpp Ver arquivo

@@ -29,10 +29,10 @@ BOOST_AUTO_TEST_CASE(get_next_work)
BOOST_AUTO_TEST_CASE(get_next_work_pow_limit)
{
const auto chainParams = CreateChainParams(CBaseChainParams::MAIN);
int64_t nLastRetargetTime = 1231006505; // Block #0
int64_t nLastRetargetTime = 1484870400; // Block #0
CBlockIndex pindexLast;
pindexLast.nHeight = 2015;
pindexLast.nTime = 1233061996; // Block #2015
pindexLast.nTime = 1517408676; // Block #2015
pindexLast.nBits = 0x1d00ffff;
BOOST_CHECK_EQUAL(CalculateNextWorkRequired(&pindexLast, nLastRetargetTime, chainParams->GetConsensus()), 0x1d00ffff);
}

+ 9
- 9
src/test/util_tests.cpp Ver arquivo

@@ -39,18 +39,18 @@ BOOST_AUTO_TEST_CASE(util_criticalsection)
}

static const unsigned char ParseHex_expected[65] = {
0x04, 0x67, 0x8a, 0xfd, 0xb0, 0xfe, 0x55, 0x48, 0x27, 0x19, 0x67, 0xf1, 0xa6, 0x71, 0x30, 0xb7,
0x10, 0x5c, 0xd6, 0xa8, 0x28, 0xe0, 0x39, 0x09, 0xa6, 0x79, 0x62, 0xe0, 0xea, 0x1f, 0x61, 0xde,
0xb6, 0x49, 0xf6, 0xbc, 0x3f, 0x4c, 0xef, 0x38, 0xc4, 0xf3, 0x55, 0x04, 0xe5, 0x1e, 0xc1, 0x12,
0xde, 0x5c, 0x38, 0x4d, 0xf7, 0xba, 0x0b, 0x8d, 0x57, 0x8a, 0x4c, 0x70, 0x2b, 0x6b, 0xf1, 0x1d,
0x5f
0x04, 0xea, 0x1e, 0x6e, 0x7c, 0xac, 0xe7, 0xb6, 0x3b, 0x88, 0x94, 0x9a, 0x3f, 0x43, 0xf0, 0x14,
0x4b, 0x00, 0x32, 0xea, 0xa9, 0xee, 0x6c, 0x96, 0x27, 0xfc, 0x58, 0xbf, 0xb5, 0x11, 0x63, 0xa2,
0x62, 0x54, 0x2f, 0xd8, 0xcd, 0xd3, 0xcc, 0x40, 0x18, 0x6a, 0x1a, 0xee, 0xb4, 0x85, 0x7c, 0x15,
0x95, 0x4e, 0x6f, 0x15, 0xf7, 0x89, 0xbf, 0xdc, 0xf9, 0xce, 0xc5, 0x98, 0x63, 0xcd, 0xfc, 0x6e,
0x14
};
BOOST_AUTO_TEST_CASE(util_ParseHex)
{
std::vector<unsigned char> result;
std::vector<unsigned char> expected(ParseHex_expected, ParseHex_expected + sizeof(ParseHex_expected));
// Basic test vector
result = ParseHex("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f");
result = ParseHex("04ea1e6e7cace7b63b88949a3f43f0144b0032eaa9ee6c9627fc58bfb51163a262542fd8cdd3cc40186a1aeeb4857c15954e6f15f789bfdcf9cec59863cdfc6e14");
BOOST_CHECK_EQUAL_COLLECTIONS(result.begin(), result.end(), expected.begin(), expected.end());

// Spaces between bytes must be supported
@@ -70,11 +70,11 @@ BOOST_AUTO_TEST_CASE(util_HexStr)
{
BOOST_CHECK_EQUAL(
HexStr(ParseHex_expected, ParseHex_expected + sizeof(ParseHex_expected)),
"04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f");
"04ea1e6e7cace7b63b88949a3f43f0144b0032eaa9ee6c9627fc58bfb51163a262542fd8cdd3cc40186a1aeeb4857c15954e6f15f789bfdcf9cec59863cdfc6e14");

BOOST_CHECK_EQUAL(
HexStr(ParseHex_expected, ParseHex_expected + 5, true),
"04 67 8a fd b0");
"04 ea 1e 6e 7c");

BOOST_CHECK_EQUAL(
HexStr(ParseHex_expected, ParseHex_expected, true),
@@ -84,7 +84,7 @@ BOOST_AUTO_TEST_CASE(util_HexStr)

BOOST_CHECK_EQUAL(
HexStr(ParseHex_vec, true),
"04 67 8a fd b0");
"04 ea 1e 6e 7c");
}



+ 8
- 9
test/functional/proxy_test.py Ver arquivo

@@ -79,9 +79,9 @@ class ProxyTest(StarwelsTestFramework):
# Note: proxies are not used to connect to local nodes
# this is because the proxy to use is based on CService.GetNetwork(), which return NET_UNROUTABLE for localhost
args = [
['-listen', '-proxy=%s:%i' % (self.conf1.addr),'-proxyrandomize=1'],
['-listen', '-proxy=%s:%i' % (self.conf1.addr),'-onion=%s:%i' % (self.conf2.addr),'-proxyrandomize=0'],
['-listen', '-proxy=%s:%i' % (self.conf2.addr),'-proxyrandomize=1'],
['-listen', '-proxy=%s:%i' % (self.conf1.addr),'-proxyrandomize=1'],
['-listen', '-proxy=%s:%i' % (self.conf1.addr),'-onion=%s:%i' % (self.conf2.addr),'-proxyrandomize=0'],
['-listen', '-proxy=%s:%i' % (self.conf2.addr),'-proxyrandomize=1'],
[]
]
if self.have_ipv6:
@@ -120,24 +120,24 @@ class ProxyTest(StarwelsTestFramework):

if test_onion:
# Test: outgoing onion connection through node
node.addnode("starwelsostk4e4re.onion:8333", "onetry")
node.addnode("starwelsostk4e4re.onion:8353", "onetry")
cmd = proxies[2].queue.get()
assert(isinstance(cmd, Socks5Command))
assert_equal(cmd.atyp, AddressType.DOMAINNAME)
assert_equal(cmd.addr, b"starwelsostk4e4re.onion")
assert_equal(cmd.port, 8333)
assert_equal(cmd.port, 8353)
if not auth:
assert_equal(cmd.username, None)
assert_equal(cmd.password, None)
rv.append(cmd)

# Test: outgoing DNS name connection through node
node.addnode("node.noumenon:8333", "onetry")
node.addnode("node.noumenon:8353", "onetry")
cmd = proxies[3].queue.get()
assert(isinstance(cmd, Socks5Command))
assert_equal(cmd.atyp, AddressType.DOMAINNAME)
assert_equal(cmd.addr, b"node.noumenon")
assert_equal(cmd.port, 8333)
assert_equal(cmd.port, 8353)
if not auth:
assert_equal(cmd.username, None)
assert_equal(cmd.password, None)
@@ -182,7 +182,7 @@ class ProxyTest(StarwelsTestFramework):
assert_equal(n1['onion']['proxy'], '%s:%i' % (self.conf2.addr))
assert_equal(n1['onion']['proxy_randomize_credentials'], False)
assert_equal(n1['onion']['reachable'], True)
n2 = networks_dict(self.nodes[2].getnetworkinfo())
for net in ['ipv4','ipv6','onion']:
assert_equal(n2[net]['proxy'], '%s:%i' % (self.conf2.addr))
@@ -198,4 +198,3 @@ class ProxyTest(StarwelsTestFramework):

if __name__ == '__main__':
ProxyTest().main()


+ 1
- 1
test/functional/zmq_test.py Ver arquivo

@@ -40,7 +40,7 @@ class ZMQTest (StarwelsTestFramework):
self.zmqSubSocket.setsockopt(zmq.SUBSCRIBE, b"hashtx")
self.zmqSubSocket.setsockopt(zmq.SUBSCRIBE, b"rawblock")
self.zmqSubSocket.setsockopt(zmq.SUBSCRIBE, b"rawtx")
ip_address = "tcp://127.0.0.1:28332"
ip_address = "tcp://127.0.0.1:28352"
self.zmqSubSocket.connect(ip_address)
self.extra_args = [['-zmqpubhashblock=%s' % ip_address, '-zmqpubhashtx=%s' % ip_address,
'-zmqpubrawblock=%s' % ip_address, '-zmqpubrawtx=%s' % ip_address], []]

Carregando…
Cancelar
Salvar