Compare commits
68
Commits
v17_master
...
v0.2-alpha
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fa00101b11 | ||
|
|
5ceed8b0f4 | ||
|
|
0b51e7305e | ||
|
|
725996f21f | ||
|
|
bedfd6cea2 | ||
|
|
f4d5f23486 | ||
|
|
a6984a9d72 | ||
|
|
7d14e09e5d | ||
|
|
ab830e84a3 | ||
|
|
ff6459a9bb | ||
|
|
6a572c8307 | ||
|
|
ba692d57f1 | ||
|
|
1f438bd9f6 | ||
|
|
c5b589c33d | ||
|
|
4873a2833b | ||
|
|
a1c1d813ae | ||
|
|
65d2644f50 | ||
|
|
c1c83ddc1b | ||
|
|
5b59877146 | ||
|
|
f6c1bab64e | ||
|
|
6e5d851231 | ||
|
|
243dd23818 | ||
|
|
27f9a96030 | ||
|
|
909303d4ec | ||
|
|
d3df7747d7 | ||
|
|
3d7b9221b5 | ||
|
|
13204c4cfa | ||
|
|
30d123a70b | ||
|
|
71a28f8d8f | ||
|
|
6bca5ead23 | ||
|
|
c2b40f1df9 | ||
|
|
dbf1afa6ff | ||
|
|
49c7c3ef25 | ||
|
|
c584a71a09 | ||
|
|
ba687afe81 | ||
|
|
5b95c0d292 | ||
|
|
1c85278d3e | ||
|
|
0e0fb4a056 | ||
|
|
361c99b104 | ||
|
|
c9785bb21f | ||
|
|
7813f3157b | ||
|
|
c8834c5551 | ||
|
|
f2a7a5c401 | ||
|
|
a1fca49174 | ||
|
|
746ffd13c8 | ||
|
|
bc266a1677 | ||
|
|
3e6efa8a2f | ||
|
|
ccc1c22301 | ||
|
|
6f9808faff | ||
|
|
b68b97388e | ||
|
|
e7654b8703 | ||
|
|
389a2a963e | ||
|
|
df59145787 | ||
|
|
79be562ff2 | ||
|
|
cd3f33c1fc | ||
|
|
b2b0bd5bb5 | ||
|
|
9bb4ecef2a | ||
|
|
e503dbe836 | ||
|
|
fd35060a6f | ||
|
|
5be46df3ed | ||
|
|
fbd0b07497 | ||
|
|
a50a5ad369 | ||
|
|
1431b9e03c | ||
|
|
9a9273ebc6 | ||
|
|
d4d3ab8115 | ||
|
|
aec93c1245 | ||
|
|
4fc3834cdd | ||
|
|
a001f51045 |
No files matched your search
+6
-5
@@ -2,11 +2,11 @@
|
||||
|
||||
*.exe
|
||||
src/bitcoin
|
||||
src/bitcoind
|
||||
src/bitcoin-cli
|
||||
src/bitcoin-tx
|
||||
src/test/test_bitcoin
|
||||
src/qt/test/test_bitcoin-qt
|
||||
src/lbrycrdd
|
||||
src/lbrycrd-cli
|
||||
src/lbrycrd-tx
|
||||
src/test/test_lbrycrd
|
||||
src/qt/test/test_lbrycrd-qt
|
||||
|
||||
# autoreconf
|
||||
Makefile.in
|
||||
@@ -74,6 +74,7 @@ src/qt/test/moc*.cpp
|
||||
# Compilation and Qt preprocessor part
|
||||
*.qm
|
||||
Makefile
|
||||
lbrycrd-qt
|
||||
bitcoin-qt
|
||||
Bitcoin-Qt.app
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Building Bitcoin
|
||||
Building LBRYcrd
|
||||
|
||||
See doc/build-*.md for instructions on building bitcoind,
|
||||
the intended-for-services, no-graphical-interface, reference
|
||||
implementation of Bitcoin.
|
||||
implementation of LBRYcrd.
|
||||
+3
-3
@@ -9,9 +9,9 @@ pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = libbitcoinconsensus.pc
|
||||
endif
|
||||
|
||||
BITCOIND_BIN=$(top_builddir)/src/bitcoind$(EXEEXT)
|
||||
BITCOIN_QT_BIN=$(top_builddir)/src/qt/bitcoin-qt$(EXEEXT)
|
||||
BITCOIN_CLI_BIN=$(top_builddir)/src/bitcoin-cli$(EXEEXT)
|
||||
BITCOIND_BIN=$(top_builddir)/src/lbrycrdd$(EXEEXT)
|
||||
BITCOIN_QT_BIN=$(top_builddir)/src/qt/lbrycrd-qt$(EXEEXT)
|
||||
BITCOIN_CLI_BIN=$(top_builddir)/src/lbrycrd-cli$(EXEEXT)
|
||||
BITCOIN_WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win$(WINDOWS_BITS)-setup$(EXEEXT)
|
||||
|
||||
OSX_APP=Bitcoin-Qt.app
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
Bitcoin Core integration/staging tree
|
||||
LBRYcrd integration/staging tree
|
||||
=====================================
|
||||
|
||||
[](https://travis-ci.org/bitcoin/bitcoin)
|
||||
http://lbry.io
|
||||
|
||||
https://www.bitcoin.org
|
||||
What is LBRYcrd?
|
||||
----------------
|
||||
|
||||
LBRYcrd is a fork of bitcoin core designed for use in the LBRY network.
|
||||
|
||||
LBRYcrd uses a blockchain similar to bitcoin's to implement a unique naming system in which the person who dedicates the largest amount of LBC to a name has control over that name.
|
||||
|
||||
What is Bitcoin?
|
||||
----------------
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ define(_CLIENT_VERSION_REVISION, 99)
|
||||
define(_CLIENT_VERSION_BUILD, 0)
|
||||
define(_CLIENT_VERSION_IS_RELEASE, false)
|
||||
define(_COPYRIGHT_YEAR, 2015)
|
||||
AC_INIT([Bitcoin Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[https://github.com/bitcoin/bitcoin/issues],[bitcoin])
|
||||
AC_INIT([LBRYcrd Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[https://github.com/bitcoin/bitcoin/issues],[lbrycrd])
|
||||
AC_CONFIG_SRCDIR([src/main.cpp])
|
||||
AC_CONFIG_HEADERS([src/config/bitcoin-config.h])
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
|
||||
@@ -63,7 +63,7 @@ def initialize_datadir(dirname, n):
|
||||
datadir = os.path.join(dirname, "node"+str(n))
|
||||
if not os.path.isdir(datadir):
|
||||
os.makedirs(datadir)
|
||||
with open(os.path.join(datadir, "bitcoin.conf"), 'w') as f:
|
||||
with open(os.path.join(datadir, "lbrycrd.conf"), 'w') as f:
|
||||
f.write("regtest=1\n");
|
||||
f.write("rpcuser=rt\n");
|
||||
f.write("rpcpassword=rt\n");
|
||||
|
||||
@@ -20,7 +20,7 @@ function ExtractKey {
|
||||
function CreateDataDir {
|
||||
DIR=$1
|
||||
mkdir -p $DIR
|
||||
CONF=$DIR/bitcoin.conf
|
||||
CONF=$DIR/lbrycrd.conf
|
||||
echo "regtest=1" >> $CONF
|
||||
echo "keypool=2" >> $CONF
|
||||
echo "rpcuser=rt" >> $CONF
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
sudo apt-get install build-essential python-dev libbz2-dev libtool autotools-dev autoconf git pkg-config
|
||||
mkdir dependencies
|
||||
cd dependencies
|
||||
wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz
|
||||
tar xf db-4.8.30.NC.tar.gz
|
||||
export BDB_PREFIX="`pwd`/bdb"
|
||||
cd db-4.8.30.NC/build_unix
|
||||
../dist/configure --prefix=$BDB_PREFIX --enable-cxx --disable-shared --with-pic
|
||||
make
|
||||
make install
|
||||
cd ../../
|
||||
wget https://www.openssl.org/source/openssl-1.0.1p.tar.gz
|
||||
tar xf openssl-1.0.1p.tar.gz
|
||||
export OPENSSL_PREFIX="`pwd`/openssl_build"
|
||||
cd openssl-1.0.1p
|
||||
./Configure --prefix=$OPENSSL_PREFIX --openssldir=$OPENSSL_PREFIX/ssl [linux-generic32/linux-x86_64] -fPIC -static no-shared no-dso
|
||||
make
|
||||
make install
|
||||
export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:${OPENSSL_BUILD}/lib/pkgconfig/"
|
||||
cd ..
|
||||
wget http://sourceforge.net/projects/boost/files/boost/1.59.0/boost_1_59_0.tar.bz2/download -O boost_1_59_0.tar.bz2
|
||||
tar xf boost_1_59_0.tar.bz2
|
||||
cd boost_1_59_0
|
||||
export BOOST_ROOT=`pwd`
|
||||
./bootstrap.sh
|
||||
./b2 link=static cxxflags=-fPIC stage
|
||||
cd ../../
|
||||
git clone https://github.com/lbryio/lbrycrd
|
||||
cd lbrycrd
|
||||
./autogen.sh
|
||||
./configure --without-gui LDFLAGS="-L${OPENSSL_PREFIX}/lib/ -L${BDB_PREFIX}/lib/ -static-libstdc++" CPPFLAGS="-I${OPENSSL_PREFIX}/include -I${BDB_PREFIX}/include"
|
||||
make
|
||||
strip src/lbrycrdd
|
||||
strip src/lbrycrd-cli
|
||||
strip src/lbrycrd-tx
|
||||
strip src/test/test-lbrycrd
|
||||
+1
-540
@@ -1,540 +1 @@
|
||||
# List of fixed seed nodes for main network
|
||||
|
||||
# IPv4 nodes (generated using contrib/seeds/makeseeds.py)
|
||||
1.33.197.110
|
||||
1.34.180.245
|
||||
1.202.128.218
|
||||
2.35.195.25
|
||||
5.100.123.19
|
||||
5.175.145.169
|
||||
5.199.133.193
|
||||
5.199.151.10
|
||||
5.228.1.230
|
||||
14.200.200.145
|
||||
18.228.0.188
|
||||
18.228.0.200
|
||||
23.30.243.153
|
||||
23.88.232.49
|
||||
23.99.105.9
|
||||
23.226.137.208
|
||||
23.227.177.161
|
||||
23.227.191.50
|
||||
23.229.45.32
|
||||
23.236.144.69
|
||||
23.253.148.113
|
||||
23.253.241.22
|
||||
23.255.227.231
|
||||
24.20.205.222
|
||||
24.23.120.252
|
||||
24.94.98.96
|
||||
24.98.95.201
|
||||
24.111.90.55
|
||||
24.119.119.105
|
||||
24.138.25.149
|
||||
31.3.214.45
|
||||
31.186.87.46
|
||||
31.186.101.98
|
||||
31.186.250.186
|
||||
31.204.153.107
|
||||
37.44.16.231
|
||||
37.44.44.11
|
||||
37.120.168.204
|
||||
37.143.86.26
|
||||
37.187.75.24
|
||||
37.188.68.169
|
||||
37.192.95.150
|
||||
37.201.246.116
|
||||
37.205.10.140
|
||||
46.10.210.17
|
||||
46.19.138.154
|
||||
46.28.204.123
|
||||
46.28.205.67
|
||||
46.38.235.229
|
||||
46.163.76.230
|
||||
46.166.162.91
|
||||
46.173.190.50
|
||||
46.227.66.132
|
||||
46.229.238.187
|
||||
46.236.116.209
|
||||
47.55.14.65
|
||||
50.7.252.229
|
||||
50.46.159.91
|
||||
50.78.49.181
|
||||
50.78.231.57
|
||||
50.79.153.65
|
||||
50.116.34.44
|
||||
50.126.86.253
|
||||
50.142.41.23
|
||||
50.199.113.193
|
||||
50.200.78.107
|
||||
50.206.138.177
|
||||
50.252.52.49
|
||||
54.165.25.75
|
||||
54.169.107.40
|
||||
54.179.190.56
|
||||
54.187.82.121
|
||||
54.246.85.246
|
||||
58.74.7.205
|
||||
58.96.183.121
|
||||
61.62.58.38
|
||||
61.63.91.72
|
||||
61.63.91.112
|
||||
61.72.211.228
|
||||
62.43.40.154
|
||||
62.43.130.178
|
||||
62.80.185.213
|
||||
62.109.49.26
|
||||
62.173.139.58
|
||||
62.181.238.186
|
||||
62.210.114.127
|
||||
63.141.228.138
|
||||
63.153.213.78
|
||||
63.223.84.145
|
||||
63.251.88.112
|
||||
64.31.110.50
|
||||
64.34.121.45
|
||||
64.114.6.42
|
||||
64.140.125.98
|
||||
64.156.193.100
|
||||
65.30.47.116
|
||||
65.35.132.177
|
||||
65.96.193.165
|
||||
65.111.189.26
|
||||
66.68.10.30
|
||||
66.114.33.250
|
||||
66.130.46.63
|
||||
66.175.215.135
|
||||
66.190.253.165
|
||||
66.194.38.254
|
||||
66.244.98.111
|
||||
67.162.238.30
|
||||
67.169.255.17
|
||||
67.183.173.25
|
||||
67.219.233.140
|
||||
67.227.240.115
|
||||
67.247.222.71
|
||||
68.43.114.66
|
||||
68.52.33.36
|
||||
68.198.245.241
|
||||
69.12.226.165
|
||||
69.13.198.188
|
||||
69.15.179.62
|
||||
69.39.239.47
|
||||
69.47.45.87
|
||||
69.62.217.206
|
||||
69.64.42.31
|
||||
69.64.81.61
|
||||
69.67.219.200
|
||||
69.90.132.157
|
||||
69.94.30.177
|
||||
69.136.175.241
|
||||
70.61.97.228
|
||||
70.123.118.132
|
||||
71.59.152.182
|
||||
71.198.248.151
|
||||
71.200.242.89
|
||||
71.225.179.157
|
||||
72.14.187.51
|
||||
72.38.34.180
|
||||
72.52.72.187
|
||||
72.91.144.182
|
||||
72.167.49.217
|
||||
72.201.243.55
|
||||
72.223.60.249
|
||||
72.228.153.102
|
||||
73.26.101.228
|
||||
73.50.158.200
|
||||
73.181.204.170
|
||||
74.57.199.180
|
||||
74.63.222.226
|
||||
74.81.231.21
|
||||
74.193.126.82
|
||||
74.207.235.164
|
||||
75.83.197.114
|
||||
75.144.114.9
|
||||
76.112.5.247
|
||||
76.174.20.247
|
||||
77.37.240.142
|
||||
77.57.202.107
|
||||
77.172.123.53
|
||||
77.221.91.253
|
||||
77.235.48.48
|
||||
77.245.78.2
|
||||
78.8.58.249
|
||||
78.27.191.182
|
||||
78.129.236.141
|
||||
78.131.88.47
|
||||
78.157.205.6
|
||||
79.132.230.144
|
||||
79.143.188.155
|
||||
79.160.221.140
|
||||
79.161.111.114
|
||||
80.100.189.3
|
||||
80.147.140.121
|
||||
80.203.75.133
|
||||
80.220.99.227
|
||||
80.222.20.169
|
||||
80.241.1.7
|
||||
81.23.191.243
|
||||
81.38.11.202
|
||||
81.80.9.71
|
||||
81.110.213.165
|
||||
81.133.155.237
|
||||
81.171.34.37
|
||||
81.181.155.180
|
||||
82.39.156.137
|
||||
82.73.161.95
|
||||
82.130.45.40
|
||||
82.165.153.47
|
||||
82.168.128.133
|
||||
82.179.225.118
|
||||
82.194.245.158
|
||||
82.199.102.10
|
||||
82.211.30.243
|
||||
82.217.133.145
|
||||
82.221.128.35
|
||||
82.221.131.177
|
||||
82.233.225.205
|
||||
83.0.249.146
|
||||
83.89.31.249
|
||||
83.128.29.231
|
||||
83.128.253.142
|
||||
83.143.130.56
|
||||
83.150.2.99
|
||||
83.150.9.196
|
||||
83.161.64.45
|
||||
83.212.103.212
|
||||
83.212.111.114
|
||||
83.246.75.8
|
||||
83.254.81.31
|
||||
83.254.150.54
|
||||
84.2.34.104
|
||||
84.15.61.60
|
||||
84.17.25.135
|
||||
84.42.144.19
|
||||
84.212.210.135
|
||||
84.215.165.231
|
||||
84.238.140.176
|
||||
84.240.31.184
|
||||
85.25.214.137
|
||||
85.139.163.132
|
||||
85.199.4.228
|
||||
85.214.61.209
|
||||
85.214.108.77
|
||||
86.123.16.17
|
||||
87.48.42.199
|
||||
87.104.168.104
|
||||
87.229.73.171
|
||||
87.236.196.77
|
||||
88.97.56.98
|
||||
88.134.178.89
|
||||
88.150.233.19
|
||||
88.168.133.3
|
||||
88.208.18.246
|
||||
88.208.33.202
|
||||
89.18.28.21
|
||||
89.85.220.84
|
||||
89.163.227.28
|
||||
89.184.83.60
|
||||
89.231.96.83
|
||||
89.236.49.117
|
||||
91.90.66.209
|
||||
91.106.194.97
|
||||
91.134.75.115
|
||||
91.152.193.36
|
||||
91.152.219.35
|
||||
91.197.10.234
|
||||
91.209.77.101
|
||||
91.210.106.147
|
||||
91.214.200.205
|
||||
91.223.115.38
|
||||
91.234.48.232
|
||||
91.250.86.18
|
||||
92.27.7.209
|
||||
92.255.207.73
|
||||
93.74.163.234
|
||||
93.84.114.106
|
||||
93.152.166.29
|
||||
93.171.216.221
|
||||
93.185.177.71
|
||||
94.19.12.244
|
||||
94.42.115.50
|
||||
94.79.177.206
|
||||
94.136.147.119
|
||||
94.143.245.5
|
||||
94.188.50.39
|
||||
94.190.227.112
|
||||
94.198.135.29
|
||||
94.226.107.86
|
||||
94.242.219.90
|
||||
94.242.229.168
|
||||
94.244.160.84
|
||||
95.31.10.209
|
||||
95.85.25.41
|
||||
95.105.161.136
|
||||
95.154.165.45
|
||||
95.154.200.216
|
||||
95.167.109.125
|
||||
95.211.125.231
|
||||
95.211.216.235
|
||||
96.33.25.17
|
||||
96.43.130.178
|
||||
97.118.8.236
|
||||
98.102.6.125
|
||||
98.202.20.45
|
||||
98.217.125.225
|
||||
98.234.210.111
|
||||
98.237.20.123
|
||||
98.255.144.176
|
||||
99.113.64.43
|
||||
99.229.22.8
|
||||
103.1.212.19
|
||||
103.30.42.189
|
||||
103.224.165.48
|
||||
103.243.94.140
|
||||
104.131.107.107
|
||||
104.131.116.184
|
||||
104.143.0.156
|
||||
104.219.184.9
|
||||
106.185.38.174
|
||||
107.6.4.145
|
||||
107.150.8.27
|
||||
107.150.33.20
|
||||
107.170.228.129
|
||||
107.170.240.173
|
||||
108.51.20.86
|
||||
108.61.149.222
|
||||
108.61.151.172
|
||||
108.161.129.247
|
||||
108.170.140.21
|
||||
109.60.211.216
|
||||
109.73.42.36
|
||||
109.73.172.138
|
||||
109.163.235.239
|
||||
109.190.196.220
|
||||
109.201.135.216
|
||||
109.228.152.2
|
||||
109.228.154.81
|
||||
109.230.220.125
|
||||
109.234.156.218
|
||||
109.235.49.27
|
||||
109.235.69.84
|
||||
112.124.71.0
|
||||
113.146.68.251
|
||||
115.29.17.82
|
||||
115.70.176.17
|
||||
117.41.162.184
|
||||
118.27.8.170
|
||||
119.230.7.211
|
||||
119.246.71.52
|
||||
121.172.8.100
|
||||
122.128.109.148
|
||||
123.231.224.63
|
||||
128.175.195.31
|
||||
128.199.164.96
|
||||
128.199.254.244
|
||||
129.97.69.76
|
||||
129.123.7.7
|
||||
129.123.7.39
|
||||
129.186.17.17
|
||||
131.247.169.190
|
||||
133.242.209.63
|
||||
134.102.94.38
|
||||
134.119.17.145
|
||||
137.116.160.176
|
||||
137.226.34.42
|
||||
138.210.217.170
|
||||
141.255.166.194
|
||||
143.215.129.126
|
||||
144.76.244.19
|
||||
146.148.52.162
|
||||
146.148.80.57
|
||||
146.185.19.30
|
||||
146.185.142.86
|
||||
146.185.253.51
|
||||
148.251.6.214
|
||||
149.154.155.235
|
||||
149.210.133.244
|
||||
151.224.248.252
|
||||
153.121.75.229
|
||||
153.127.251.67
|
||||
154.20.2.139
|
||||
157.13.61.5
|
||||
158.58.173.48
|
||||
159.253.23.132
|
||||
162.209.110.218
|
||||
162.213.254.205
|
||||
162.239.254.100
|
||||
162.242.150.39
|
||||
162.243.81.138
|
||||
162.243.235.56
|
||||
162.244.79.16
|
||||
162.245.217.119
|
||||
162.248.102.117
|
||||
162.251.108.53
|
||||
162.254.149.139
|
||||
162.255.116.78
|
||||
166.70.94.106
|
||||
167.88.45.124
|
||||
167.88.120.210
|
||||
173.26.49.43
|
||||
173.30.14.6
|
||||
173.80.114.197
|
||||
173.167.214.243
|
||||
173.208.219.108
|
||||
173.220.67.156
|
||||
173.236.101.34
|
||||
173.246.107.34
|
||||
173.255.237.241
|
||||
174.2.213.209
|
||||
174.51.23.224
|
||||
174.51.123.159
|
||||
174.57.212.121
|
||||
174.109.33.28
|
||||
175.126.124.91
|
||||
175.126.124.92
|
||||
176.10.116.242
|
||||
176.36.35.126
|
||||
176.36.99.222
|
||||
176.124.110.47
|
||||
176.194.33.44
|
||||
176.223.201.198
|
||||
178.62.26.83
|
||||
178.62.36.48
|
||||
178.62.212.141
|
||||
178.62.254.59
|
||||
178.78.250.3
|
||||
178.155.86.226
|
||||
178.175.134.35
|
||||
178.248.111.4
|
||||
178.254.1.170
|
||||
178.254.34.161
|
||||
179.43.114.14
|
||||
182.213.208.28
|
||||
184.68.2.46
|
||||
184.72.238.42
|
||||
184.94.226.34
|
||||
184.94.227.58
|
||||
184.107.139.58
|
||||
184.107.206.45
|
||||
185.10.48.117
|
||||
185.21.216.156
|
||||
185.38.47.224
|
||||
185.45.192.129
|
||||
185.53.129.230
|
||||
185.53.131.114
|
||||
185.55.53.61
|
||||
185.55.53.63
|
||||
185.61.119.2
|
||||
185.61.148.203
|
||||
186.2.167.23
|
||||
188.92.75.178
|
||||
188.122.92.134
|
||||
188.138.9.208
|
||||
188.165.209.148
|
||||
188.226.206.239
|
||||
190.10.8.124
|
||||
190.10.10.147
|
||||
192.0.130.142
|
||||
192.3.89.159
|
||||
192.73.234.138
|
||||
192.75.95.107
|
||||
192.95.100.102
|
||||
192.155.84.181
|
||||
192.169.233.206
|
||||
192.198.93.86
|
||||
192.227.135.216
|
||||
193.0.109.3
|
||||
193.77.50.208
|
||||
193.109.68.62
|
||||
193.150.121.37
|
||||
193.224.69.98
|
||||
194.79.8.37
|
||||
194.141.86.10
|
||||
195.12.180.94
|
||||
195.56.63.10
|
||||
195.116.93.93
|
||||
195.154.174.226
|
||||
195.159.111.98
|
||||
195.169.138.2
|
||||
195.189.126.35
|
||||
195.197.175.190
|
||||
197.242.93.82
|
||||
198.11.214.147
|
||||
198.49.41.21
|
||||
199.33.124.186
|
||||
199.204.186.146
|
||||
199.233.238.115
|
||||
199.241.189.66
|
||||
202.60.68.242
|
||||
202.60.69.232
|
||||
203.183.151.39
|
||||
203.219.14.204
|
||||
204.44.123.109
|
||||
204.44.123.162
|
||||
204.45.120.178
|
||||
206.190.134.44
|
||||
206.248.184.127
|
||||
207.244.73.8
|
||||
208.66.30.27
|
||||
209.81.9.223
|
||||
209.105.243.229
|
||||
209.126.70.159
|
||||
209.140.30.169
|
||||
209.165.128.235
|
||||
209.190.2.242
|
||||
210.66.254.236
|
||||
210.73.27.33
|
||||
211.72.66.229
|
||||
212.25.37.124
|
||||
212.71.235.114
|
||||
212.71.252.109
|
||||
212.114.48.31
|
||||
212.174.151.118
|
||||
213.66.205.194
|
||||
213.129.248.139
|
||||
213.136.87.34
|
||||
213.165.82.133
|
||||
213.167.17.6
|
||||
213.179.158.253
|
||||
213.189.53.125
|
||||
213.222.208.93
|
||||
216.49.158.161
|
||||
216.55.143.154
|
||||
216.131.91.100
|
||||
216.245.206.181
|
||||
216.250.138.230
|
||||
217.11.225.189
|
||||
217.23.6.133
|
||||
217.75.88.178
|
||||
217.172.143.140
|
||||
217.195.169.209
|
||||
217.196.248.106
|
||||
219.138.161.162
|
||||
222.167.248.90
|
||||
223.18.254.55
|
||||
|
||||
# Onion nodes
|
||||
bitcoinostk4e4re.onion:8333
|
||||
5k4vwyy5stro33fb.onion:8333
|
||||
zy3kdqowmrb7xm7h.onion:8333
|
||||
e3tn727fywnioxrc.onion:8333
|
||||
kjy2eqzk4zwi5zd3.onion:8333
|
||||
pt2awtcs2ulm75ig.onion:8333
|
||||
td7tgof3imei3fm6.onion:8333
|
||||
czsbwh4pq4mh3izl.onion:8333
|
||||
xdnigz4qn5dbbw2t.onion:8333
|
||||
ymnsfdejmc74vcfb.onion:7033
|
||||
jxrvw5iqizppbgml.onion:8333
|
||||
bk5ejfe56xakvtkk.onion:8333
|
||||
szsm43ou7otwwyfv.onion:8333
|
||||
5ghqw4wj6hpgfvdg.onion:8333
|
||||
evolynhit7shzeet.onion:8333
|
||||
4crhf372poejlc44.onion:8333
|
||||
tfu4kqfhsw5slqp2.onion:8333
|
||||
i2r5tbaizb75h26f.onion:8333
|
||||
btcnet3utgzyz2bf.onion:8333
|
||||
vso3r6cmjoomhhgg.onion:8333
|
||||
pqosrh6wfaucet32.onion:8333
|
||||
zy3kdqowmrb7xm7h.onion:8333
|
||||
r4de4zf4lyniu4mx.onion:8444
|
||||
52.27.78.56
|
||||
@@ -1,5 +1,5 @@
|
||||
# List of fixed seed nodes for testnet
|
||||
|
||||
# Onion nodes
|
||||
thfsmmn2jbitcoin.onion
|
||||
it2pj4f7657g3rhi.onion
|
||||
#thfsmmn2jbitcoin.onion
|
||||
#it2pj4f7657g3rhi.onion
|
||||
+26
-21
@@ -60,11 +60,11 @@ bin_PROGRAMS =
|
||||
TESTS =
|
||||
|
||||
if BUILD_BITCOIND
|
||||
bin_PROGRAMS += bitcoind
|
||||
bin_PROGRAMS += lbrycrdd
|
||||
endif
|
||||
|
||||
if BUILD_BITCOIN_UTILS
|
||||
bin_PROGRAMS += bitcoin-cli bitcoin-tx
|
||||
bin_PROGRAMS += lbrycrd-cli lbrycrd-tx
|
||||
endif
|
||||
|
||||
.PHONY: FORCE
|
||||
@@ -107,6 +107,8 @@ BITCOIN_CORE_H = \
|
||||
merkleblock.h \
|
||||
miner.h \
|
||||
mruset.h \
|
||||
ncc.h \
|
||||
ncctrie.h \
|
||||
net.h \
|
||||
netbase.h \
|
||||
noui.h \
|
||||
@@ -173,6 +175,7 @@ libbitcoin_server_a_SOURCES = \
|
||||
main.cpp \
|
||||
merkleblock.cpp \
|
||||
miner.cpp \
|
||||
ncctrie.cpp \
|
||||
net.cpp \
|
||||
noui.cpp \
|
||||
policy/fees.cpp \
|
||||
@@ -181,6 +184,7 @@ libbitcoin_server_a_SOURCES = \
|
||||
rpcblockchain.cpp \
|
||||
rpcmining.cpp \
|
||||
rpcmisc.cpp \
|
||||
rpcncctrie.cpp \
|
||||
rpcnet.cpp \
|
||||
rpcrawtransaction.cpp \
|
||||
rpcserver.cpp \
|
||||
@@ -245,6 +249,7 @@ libbitcoin_common_a_SOURCES = \
|
||||
hash.cpp \
|
||||
key.cpp \
|
||||
keystore.cpp \
|
||||
ncc.cpp \
|
||||
netbase.cpp \
|
||||
primitives/block.cpp \
|
||||
primitives/transaction.cpp \
|
||||
@@ -294,15 +299,15 @@ nodist_libbitcoin_util_a_SOURCES = $(srcdir)/obj/build.h
|
||||
#
|
||||
|
||||
# bitcoind binary #
|
||||
bitcoind_SOURCES = bitcoind.cpp
|
||||
bitcoind_CPPFLAGS = $(BITCOIN_INCLUDES)
|
||||
bitcoind_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
|
||||
lbrycrdd_SOURCES = bitcoind.cpp
|
||||
lbrycrdd_CPPFLAGS = $(BITCOIN_INCLUDES)
|
||||
lbrycrdd_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
|
||||
|
||||
if TARGET_WINDOWS
|
||||
bitcoind_SOURCES += bitcoind-res.rc
|
||||
lbrycrdd_SOURCES += lbrycrdd-res.rc
|
||||
endif
|
||||
|
||||
bitcoind_LDADD = \
|
||||
lbrycrdd_LDADD = \
|
||||
$(LIBBITCOIN_SERVER) \
|
||||
$(LIBBITCOIN_COMMON) \
|
||||
$(LIBBITCOIN_UNIVALUE) \
|
||||
@@ -313,47 +318,47 @@ bitcoind_LDADD = \
|
||||
$(LIBSECP256K1)
|
||||
|
||||
if ENABLE_WALLET
|
||||
bitcoind_LDADD += libbitcoin_wallet.a
|
||||
lbrycrdd_LDADD += libbitcoin_wallet.a
|
||||
endif
|
||||
|
||||
bitcoind_LDADD += $(BOOST_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS)
|
||||
lbrycrdd_LDADD += $(BOOST_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS)
|
||||
#
|
||||
|
||||
# bitcoin-cli binary #
|
||||
bitcoin_cli_SOURCES = bitcoin-cli.cpp
|
||||
bitcoin_cli_CPPFLAGS = $(BITCOIN_INCLUDES)
|
||||
bitcoin_cli_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
|
||||
lbrycrd_cli_SOURCES = bitcoin-cli.cpp
|
||||
lbrycrd_cli_CPPFLAGS = $(BITCOIN_INCLUDES)
|
||||
lbrycrd_cli_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
|
||||
|
||||
if TARGET_WINDOWS
|
||||
bitcoin_cli_SOURCES += bitcoin-cli-res.rc
|
||||
lbrycrd_cli_SOURCES += bitcoin-cli-res.rc
|
||||
endif
|
||||
|
||||
bitcoin_cli_LDADD = \
|
||||
lbrycrd_cli_LDADD = \
|
||||
$(LIBBITCOIN_CLI) \
|
||||
$(LIBBITCOIN_UNIVALUE) \
|
||||
$(LIBBITCOIN_UTIL) \
|
||||
$(LIBSECP256K1)
|
||||
|
||||
bitcoin_cli_LDADD += $(BOOST_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS)
|
||||
lbrycrd_cli_LDADD += $(BOOST_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS)
|
||||
#
|
||||
|
||||
# bitcoin-tx binary #
|
||||
bitcoin_tx_SOURCES = bitcoin-tx.cpp
|
||||
bitcoin_tx_CPPFLAGS = $(BITCOIN_INCLUDES)
|
||||
bitcoin_tx_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
|
||||
lbrycrd_tx_SOURCES = bitcoin-tx.cpp
|
||||
lbrycrd_tx_CPPFLAGS = $(BITCOIN_INCLUDES)
|
||||
lbrycrd_tx_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
|
||||
|
||||
if TARGET_WINDOWS
|
||||
bitcoin_tx_SOURCES += bitcoin-tx-res.rc
|
||||
lbrycrd_tx_SOURCES += bitcoin-tx-res.rc
|
||||
endif
|
||||
|
||||
bitcoin_tx_LDADD = \
|
||||
lbrycrd_tx_LDADD = \
|
||||
$(LIBBITCOIN_UNIVALUE) \
|
||||
$(LIBBITCOIN_COMMON) \
|
||||
$(LIBBITCOIN_UTIL) \
|
||||
$(LIBBITCOIN_CRYPTO) \
|
||||
$(LIBSECP256K1)
|
||||
|
||||
bitcoin_tx_LDADD += $(BOOST_LIBS) $(CRYPTO_LIBS)
|
||||
lbrycrd_tx_LDADD += $(BOOST_LIBS) $(CRYPTO_LIBS)
|
||||
#
|
||||
|
||||
# bitcoinconsensus library #
|
||||
|
||||
+14
-14
@@ -1,4 +1,4 @@
|
||||
bin_PROGRAMS += qt/bitcoin-qt
|
||||
bin_PROGRAMS += qt/lbrycrd-qt
|
||||
EXTRA_LIBRARIES += qt/libbitcoinqt.a
|
||||
|
||||
# bitcoin qt core #
|
||||
@@ -339,7 +339,7 @@ QT_FORMS_H=$(join $(dir $(QT_FORMS_UI)),$(addprefix ui_, $(notdir $(QT_FORMS_UI:
|
||||
# Most files will depend on the forms and moc files as includes. Generate them
|
||||
# before anything else.
|
||||
$(QT_MOC): $(QT_FORMS_H)
|
||||
$(qt_libbitcoinqt_a_OBJECTS) $(qt_bitcoin_qt_OBJECTS) : | $(QT_MOC)
|
||||
$(qt_libbitcoinqt_a_OBJECTS) $(qt_lbrycrd_qt_OBJECTS) : | $(QT_MOC)
|
||||
|
||||
#Generating these with a half-written protobuf header leads to wacky results.
|
||||
#This makes sure it's done.
|
||||
@@ -347,24 +347,24 @@ $(QT_MOC): $(PROTOBUF_H)
|
||||
$(QT_MOC_CPP): $(PROTOBUF_H)
|
||||
|
||||
# bitcoin-qt binary #
|
||||
qt_bitcoin_qt_CPPFLAGS = $(BITCOIN_INCLUDES) $(BITCOIN_QT_INCLUDES) \
|
||||
qt_lbrycrd_qt_CPPFLAGS = $(BITCOIN_INCLUDES) $(BITCOIN_QT_INCLUDES) \
|
||||
$(QT_INCLUDES) $(PROTOBUF_CFLAGS) $(QR_CFLAGS)
|
||||
|
||||
qt_bitcoin_qt_SOURCES = qt/bitcoin.cpp
|
||||
qt_lbrycrd_qt_SOURCES = qt/bitcoin.cpp
|
||||
if TARGET_DARWIN
|
||||
qt_bitcoin_qt_SOURCES += $(BITCOIN_MM)
|
||||
qt_lbrycrd_qt_SOURCES += $(BITCOIN_MM)
|
||||
endif
|
||||
if TARGET_WINDOWS
|
||||
qt_bitcoin_qt_SOURCES += $(BITCOIN_RC)
|
||||
qt_lbrycrd_qt_SOURCES += $(BITCOIN_RC)
|
||||
endif
|
||||
qt_bitcoin_qt_LDADD = qt/libbitcoinqt.a $(LIBBITCOIN_SERVER)
|
||||
qt_lbrycrd_qt_LDADD = qt/libbitcoinqt.a $(LIBBITCOIN_SERVER)
|
||||
if ENABLE_WALLET
|
||||
qt_bitcoin_qt_LDADD += $(LIBBITCOIN_WALLET)
|
||||
qt_lbrycrd_qt_LDADD += $(LIBBITCOIN_WALLET)
|
||||
endif
|
||||
qt_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \
|
||||
qt_lbrycrd_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \
|
||||
$(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(LIBSECP256K1)
|
||||
qt_bitcoin_qt_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(QT_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
|
||||
qt_bitcoin_qt_LIBTOOLFLAGS = --tag CXX
|
||||
qt_lbrycrd_qt_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(QT_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
|
||||
qt_lbrycrd_qt_LIBTOOLFLAGS = --tag CXX
|
||||
|
||||
#locale/foo.ts -> locale/foo.qm
|
||||
QT_QM=$(QT_TS:.ts=.qm)
|
||||
@@ -394,10 +394,10 @@ CLEAN_QT = $(nodist_qt_libbitcoinqt_a_SOURCES) $(QT_QM) $(QT_FORMS_H) qt/*.gcda
|
||||
|
||||
CLEANFILES += $(CLEAN_QT)
|
||||
|
||||
bitcoin_qt_clean: FORCE
|
||||
rm -f $(CLEAN_QT) $(qt_libbitcoinqt_a_OBJECTS) $(qt_bitcoin_qt_OBJECTS) qt/bitcoin-qt$(EXEEXT) $(LIBBITCOINQT)
|
||||
lbrycrd_qt_clean: FORCE
|
||||
rm -f $(CLEAN_QT) $(qt_libbitcoinqt_a_OBJECTS) $(qt_lbrycrd_qt_OBJECTS) qt/lbrycrd-qt$(EXEEXT) $(LIBBITCOINQT)
|
||||
|
||||
bitcoin_qt : qt/bitcoin-qt$(EXEEXT)
|
||||
lbrycrd_qt : qt/lbrycrd-qt$(EXEEXT)
|
||||
|
||||
ui_%.h: %.ui
|
||||
@test -f $(UIC)
|
||||
|
||||
+14
-14
@@ -1,5 +1,5 @@
|
||||
bin_PROGRAMS += qt/test/test_bitcoin-qt
|
||||
TESTS += qt/test/test_bitcoin-qt
|
||||
bin_PROGRAMS += qt/test/test_lbrycrd-qt
|
||||
TESTS += qt/test/test_lbrycrd-qt
|
||||
|
||||
TEST_QT_MOC_CPP = qt/test/moc_uritests.cpp
|
||||
|
||||
@@ -12,37 +12,37 @@ TEST_QT_H = \
|
||||
qt/test/paymentrequestdata.h \
|
||||
qt/test/paymentservertests.h
|
||||
|
||||
qt_test_test_bitcoin_qt_CPPFLAGS = $(BITCOIN_INCLUDES) $(BITCOIN_QT_INCLUDES) \
|
||||
qt_test_test_lbrycrd_qt_CPPFLAGS = $(BITCOIN_INCLUDES) $(BITCOIN_QT_INCLUDES) \
|
||||
$(QT_INCLUDES) $(QT_TEST_INCLUDES) $(PROTOBUF_CFLAGS)
|
||||
|
||||
qt_test_test_bitcoin_qt_SOURCES = \
|
||||
qt_test_test_lbrycrd_qt_SOURCES = \
|
||||
qt/test/test_main.cpp \
|
||||
qt/test/uritests.cpp \
|
||||
$(TEST_QT_H)
|
||||
if ENABLE_WALLET
|
||||
qt_test_test_bitcoin_qt_SOURCES += \
|
||||
qt_test_test_lbrycrd_qt_SOURCES += \
|
||||
qt/test/paymentservertests.cpp
|
||||
endif
|
||||
|
||||
nodist_qt_test_test_bitcoin_qt_SOURCES = $(TEST_QT_MOC_CPP)
|
||||
nodist_qt_test_test_lbrycrd_qt_SOURCES = $(TEST_QT_MOC_CPP)
|
||||
|
||||
qt_test_test_bitcoin_qt_LDADD = $(LIBBITCOINQT) $(LIBBITCOIN_SERVER)
|
||||
qt_test_test_lbrycrd_qt_LDADD = $(LIBBITCOINQT) $(LIBBITCOIN_SERVER)
|
||||
if ENABLE_WALLET
|
||||
qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_WALLET)
|
||||
qt_test_test_lbrycrd_qt_LDADD += $(LIBBITCOIN_WALLET)
|
||||
endif
|
||||
qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) \
|
||||
qt_test_test_lbrycrd_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) \
|
||||
$(LIBMEMENV) $(BOOST_LIBS) $(QT_DBUS_LIBS) $(QT_TEST_LIBS) $(QT_LIBS) \
|
||||
$(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(LIBSECP256K1)
|
||||
qt_test_test_bitcoin_qt_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(QT_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
|
||||
qt_test_test_lbrycrd_qt_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(QT_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
|
||||
|
||||
CLEAN_BITCOIN_QT_TEST = $(TEST_QT_MOC_CPP) qt/test/*.gcda qt/test/*.gcno
|
||||
|
||||
CLEANFILES += $(CLEAN_BITCOIN_QT_TEST)
|
||||
|
||||
test_bitcoin_qt : qt/test/test_bitcoin-qt$(EXEEXT)
|
||||
test_lbrycrd_qt : qt/test/test_lbrycrd-qt$(EXEEXT)
|
||||
|
||||
test_bitcoin_qt_check : qt/test/test_bitcoin-qt$(EXEEXT) FORCE
|
||||
test_lbrycrd_qt_check : qt/test/test_lbrycrd-qt$(EXEEXT) FORCE
|
||||
$(MAKE) check-TESTS TESTS=$^
|
||||
|
||||
test_bitcoin_qt_clean: FORCE
|
||||
rm -f $(CLEAN_BITCOIN_QT_TEST) $(qt_test_test_bitcoin_qt_OBJECTS)
|
||||
test_lbrycrd_qt_clean: FORCE
|
||||
rm -f $(CLEAN_BITCOIN_QT_TEST) $(qt_test_test_lbrycrd_qt_OBJECTS)
|
||||
+15
-14
@@ -1,7 +1,7 @@
|
||||
TESTS += test/test_bitcoin
|
||||
bin_PROGRAMS += test/test_bitcoin
|
||||
TESTS += test/test_lbrycrd
|
||||
bin_PROGRAMS += test/test_lbrycrd
|
||||
TEST_SRCDIR = test
|
||||
TEST_BINARY=test/test_bitcoin$(EXEEXT)
|
||||
TEST_BINARY=test/test_lbrycrd$(EXEEXT)
|
||||
|
||||
|
||||
EXTRA_DIST += \
|
||||
@@ -55,6 +55,7 @@ BITCOIN_TESTS =\
|
||||
test/miner_tests.cpp \
|
||||
test/mruset_tests.cpp \
|
||||
test/multisig_tests.cpp \
|
||||
test/ncctrie_tests.cpp \
|
||||
test/netbase_tests.cpp \
|
||||
test/pmt_tests.cpp \
|
||||
test/policyestimator_tests.cpp \
|
||||
@@ -84,18 +85,18 @@ BITCOIN_TESTS += \
|
||||
test/rpc_wallet_tests.cpp
|
||||
endif
|
||||
|
||||
test_test_bitcoin_SOURCES = $(BITCOIN_TESTS) $(JSON_TEST_FILES) $(RAW_TEST_FILES)
|
||||
test_test_bitcoin_CPPFLAGS = $(BITCOIN_INCLUDES) -I$(builddir)/test/ $(TESTDEFS)
|
||||
test_test_bitcoin_LDADD = $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \
|
||||
test_test_lbrycrd_SOURCES = $(BITCOIN_TESTS) $(JSON_TEST_FILES) $(RAW_TEST_FILES)
|
||||
test_test_lbrycrd_CPPFLAGS = $(BITCOIN_INCLUDES) -I$(builddir)/test/ $(TESTDEFS)
|
||||
test_test_lbrycrd_LDADD = $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \
|
||||
$(BOOST_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB) $(LIBSECP256K1)
|
||||
if ENABLE_WALLET
|
||||
test_test_bitcoin_LDADD += $(LIBBITCOIN_WALLET)
|
||||
test_test_lbrycrd_LDADD += $(LIBBITCOIN_WALLET)
|
||||
endif
|
||||
|
||||
test_test_bitcoin_LDADD += $(LIBBITCOIN_CONSENSUS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS)
|
||||
test_test_bitcoin_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) -static
|
||||
test_test_lbrycrd_LDADD += $(LIBBITCOIN_CONSENSUS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS)
|
||||
test_test_lbrycrd_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) -static
|
||||
|
||||
nodist_test_test_bitcoin_SOURCES = $(GENERATED_TEST_FILES)
|
||||
nodist_test_test_lbrycrd_SOURCES = $(GENERATED_TEST_FILES)
|
||||
|
||||
$(BITCOIN_TESTS): $(GENERATED_TEST_FILES)
|
||||
|
||||
@@ -103,13 +104,13 @@ CLEAN_BITCOIN_TEST = test/*.gcda test/*.gcno $(GENERATED_TEST_FILES)
|
||||
|
||||
CLEANFILES += $(CLEAN_BITCOIN_TEST)
|
||||
|
||||
bitcoin_test: $(TEST_BINARY)
|
||||
lbrycrd_test: $(TEST_BINARY)
|
||||
|
||||
bitcoin_test_check: $(TEST_BINARY) FORCE
|
||||
lbrycrd_test_check: $(TEST_BINARY) FORCE
|
||||
$(MAKE) check-TESTS TESTS=$^
|
||||
|
||||
bitcoin_test_clean : FORCE
|
||||
rm -f $(CLEAN_BITCOIN_TEST) $(test_test_bitcoin_OBJECTS) $(TEST_BINARY)
|
||||
lbrycrd_test_clean : FORCE
|
||||
rm -f $(CLEAN_BITCOIN_TEST) $(test_test_lbrycrd_OBJECTS) $(TEST_BINARY)
|
||||
|
||||
check-local:
|
||||
@echo "Running test/bitcoin-util-test.py..."
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ static const CAmount CENT = 1000000;
|
||||
* critical; in unusual circumstances like a(nother) overflow bug that allowed
|
||||
* for the creation of coins out of thin air modification could lead to a fork.
|
||||
* */
|
||||
static const CAmount MAX_MONEY = 21000000 * COIN;
|
||||
static const CAmount MAX_MONEY = 21000000000 * COIN;
|
||||
inline bool MoneyRange(const CAmount& nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
|
||||
|
||||
/** Type-safe wrapper class to for fee rates
|
||||
|
||||
@@ -16,14 +16,14 @@ BEGIN
|
||||
BEGIN
|
||||
BLOCK "040904E4" // U.S. English - multilingual (hex)
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Bitcoin"
|
||||
VALUE "FileDescription", "bitcoin-cli (JSON-RPC client for Bitcoin Core)"
|
||||
VALUE "CompanyName", "LBRY, Inc"
|
||||
VALUE "FileDescription", "lbrycrd-cli (JSON-RPC client for LBRYcrd Core)"
|
||||
VALUE "FileVersion", VER_FILEVERSION_STR
|
||||
VALUE "InternalName", "bitcoin-cli"
|
||||
VALUE "InternalName", "lbrycrd-cli"
|
||||
VALUE "LegalCopyright", COPYRIGHT_STR
|
||||
VALUE "LegalTrademarks1", "Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php."
|
||||
VALUE "OriginalFilename", "bitcoin-cli.exe"
|
||||
VALUE "ProductName", "bitcoin-cli"
|
||||
VALUE "OriginalFilename", "lbrycrd-cli.exe"
|
||||
VALUE "ProductName", "lbrycrd-cli"
|
||||
VALUE "ProductVersion", VER_PRODUCTVERSION_STR
|
||||
END
|
||||
END
|
||||
|
||||
+5
-5
@@ -21,7 +21,7 @@ std::string HelpMessageCli()
|
||||
string strUsage;
|
||||
strUsage += HelpMessageGroup(_("Options:"));
|
||||
strUsage += HelpMessageOpt("-?", _("This help message"));
|
||||
strUsage += HelpMessageOpt("-conf=<file>", strprintf(_("Specify configuration file (default: %s)"), "bitcoin.conf"));
|
||||
strUsage += HelpMessageOpt("-conf=<file>", strprintf(_("Specify configuration file (default: %s)"), "lbrycrd.conf"));
|
||||
strUsage += HelpMessageOpt("-datadir=<dir>", _("Specify data directory"));
|
||||
strUsage += HelpMessageOpt("-testnet", _("Use the test network"));
|
||||
strUsage += HelpMessageOpt("-regtest", _("Enter regression test mode, which uses a special chain in which blocks can be "
|
||||
@@ -64,12 +64,12 @@ static bool AppInitRPC(int argc, char* argv[])
|
||||
//
|
||||
ParseParameters(argc, argv);
|
||||
if (argc<2 || mapArgs.count("-?") || mapArgs.count("-help") || mapArgs.count("-version")) {
|
||||
std::string strUsage = _("Bitcoin Core RPC client version") + " " + FormatFullVersion() + "\n";
|
||||
std::string strUsage = _("LBRYcrd Core RPC client version") + " " + FormatFullVersion() + "\n";
|
||||
if (!mapArgs.count("-version")) {
|
||||
strUsage += "\n" + _("Usage:") + "\n" +
|
||||
" bitcoin-cli [options] <command> [params] " + _("Send command to Bitcoin Core") + "\n" +
|
||||
" bitcoin-cli [options] help " + _("List commands") + "\n" +
|
||||
" bitcoin-cli [options] help <command> " + _("Get help for a command") + "\n";
|
||||
" lbrycrd-cli [options] <command> [params] " + _("Send command to LBRYcrd Core") + "\n" +
|
||||
" lbrycrd-cli [options] help " + _("List commands") + "\n" +
|
||||
" lbrycrd-cli [options] help <command> " + _("Get help for a command") + "\n";
|
||||
|
||||
strUsage += "\n" + HelpMessageCli();
|
||||
}
|
||||
|
||||
@@ -16,14 +16,14 @@ BEGIN
|
||||
BEGIN
|
||||
BLOCK "040904E4" // U.S. English - multilingual (hex)
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Bitcoin"
|
||||
VALUE "FileDescription", "bitcoin-tx (CLI Bitcoin transaction editor utility)"
|
||||
VALUE "CompanyName", "LBRY, Inc"
|
||||
VALUE "FileDescription", "lbrycrd-tx (CLI LBRYcrd transaction editor utility)"
|
||||
VALUE "FileVersion", VER_FILEVERSION_STR
|
||||
VALUE "InternalName", "bitcoin-tx"
|
||||
VALUE "InternalName", "lbrycrd-tx"
|
||||
VALUE "LegalCopyright", COPYRIGHT_STR
|
||||
VALUE "LegalTrademarks1", "Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php."
|
||||
VALUE "OriginalFilename", "bitcoin-tx.exe"
|
||||
VALUE "ProductName", "bitcoin-tx"
|
||||
VALUE "OriginalFilename", "lbrycrd-tx.exe"
|
||||
VALUE "ProductName", "lbrycrd-tx"
|
||||
VALUE "ProductVersion", VER_PRODUCTVERSION_STR
|
||||
END
|
||||
END
|
||||
|
||||
+3
-3
@@ -44,10 +44,10 @@ static bool AppInitRawTx(int argc, char* argv[])
|
||||
if (argc<2 || mapArgs.count("-?") || mapArgs.count("-help"))
|
||||
{
|
||||
// First part of help message is specific to this utility
|
||||
std::string strUsage = _("Bitcoin Core bitcoin-tx utility version") + " " + FormatFullVersion() + "\n\n" +
|
||||
std::string strUsage = _("LBRYcrd Core lbrycrd-tx utility version") + " " + FormatFullVersion() + "\n\n" +
|
||||
_("Usage:") + "\n" +
|
||||
" bitcoin-tx [options] <hex-tx> [commands] " + _("Update hex-encoded bitcoin transaction") + "\n" +
|
||||
" bitcoin-tx [options] -create [commands] " + _("Create hex-encoded bitcoin transaction") + "\n" +
|
||||
" lbrycrd-tx [options] <hex-tx> [commands] " + _("Update hex-encoded lbrycrd transaction") + "\n" +
|
||||
" lbrycrd-tx [options] -create [commands] " + _("Create hex-encoded lbrycrd transaction") + "\n" +
|
||||
"\n";
|
||||
|
||||
fprintf(stdout, "%s", strUsage.c_str());
|
||||
|
||||
+5
-5
@@ -16,14 +16,14 @@ BEGIN
|
||||
BEGIN
|
||||
BLOCK "040904E4" // U.S. English - multilingual (hex)
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Bitcoin"
|
||||
VALUE "FileDescription", "bitcoind (Bitcoin node with a JSON-RPC server)"
|
||||
VALUE "CompanyName", "LBRY, Inc"
|
||||
VALUE "FileDescription", "lbrycrdd (LBRYcrd node with a JSON-RPC server)"
|
||||
VALUE "FileVersion", VER_FILEVERSION_STR
|
||||
VALUE "InternalName", "bitcoind"
|
||||
VALUE "InternalName", "lbrycrdd"
|
||||
VALUE "LegalCopyright", COPYRIGHT_STR
|
||||
VALUE "LegalTrademarks1", "Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php."
|
||||
VALUE "OriginalFilename", "bitcoind.exe"
|
||||
VALUE "ProductName", "bitcoind"
|
||||
VALUE "OriginalFilename", "lbrycrdd.exe"
|
||||
VALUE "ProductName", "lbrycrdd"
|
||||
VALUE "ProductVersion", VER_PRODUCTVERSION_STR
|
||||
END
|
||||
END
|
||||
|
||||
+4
-4
@@ -78,7 +78,7 @@ bool AppInit(int argc, char* argv[])
|
||||
else
|
||||
{
|
||||
strUsage += "\n" + _("Usage:") + "\n" +
|
||||
" bitcoind [options] " + _("Start Bitcoin Core Daemon") + "\n";
|
||||
" lbrycrdd [options] " + _("Start Bitcoin Core Daemon") + "\n";
|
||||
|
||||
strUsage += "\n" + HelpMessage(HMM_BITCOIND);
|
||||
}
|
||||
@@ -110,19 +110,19 @@ bool AppInit(int argc, char* argv[])
|
||||
// Command-line RPC
|
||||
bool fCommandLine = false;
|
||||
for (int i = 1; i < argc; i++)
|
||||
if (!IsSwitchChar(argv[i][0]) && !boost::algorithm::istarts_with(argv[i], "bitcoin:"))
|
||||
if (!IsSwitchChar(argv[i][0]) && !boost::algorithm::istarts_with(argv[i], "lbrycrd:"))
|
||||
fCommandLine = true;
|
||||
|
||||
if (fCommandLine)
|
||||
{
|
||||
fprintf(stderr, "Error: There is no RPC client functionality in bitcoind anymore. Use the bitcoin-cli utility instead.\n");
|
||||
fprintf(stderr, "Error: There is no RPC client functionality in lbrycrdd anymore. Use the lbrycrd-cli utility instead.\n");
|
||||
exit(1);
|
||||
}
|
||||
#ifndef WIN32
|
||||
fDaemon = GetBoolArg("-daemon", false);
|
||||
if (fDaemon)
|
||||
{
|
||||
fprintf(stdout, "Bitcoin server starting\n");
|
||||
fprintf(stdout, "LBRYcrd server starting\n");
|
||||
|
||||
// Daemonize
|
||||
pid_t pid = fork();
|
||||
|
||||
+8
-1
@@ -141,6 +141,7 @@ public:
|
||||
//! block header
|
||||
int nVersion;
|
||||
uint256 hashMerkleRoot;
|
||||
uint256 hashNCCTrie;
|
||||
unsigned int nTime;
|
||||
unsigned int nBits;
|
||||
unsigned int nNonce;
|
||||
@@ -165,6 +166,7 @@ public:
|
||||
|
||||
nVersion = 0;
|
||||
hashMerkleRoot = uint256();
|
||||
hashNCCTrie = uint256();
|
||||
nTime = 0;
|
||||
nBits = 0;
|
||||
nNonce = 0;
|
||||
@@ -181,6 +183,7 @@ public:
|
||||
|
||||
nVersion = block.nVersion;
|
||||
hashMerkleRoot = block.hashMerkleRoot;
|
||||
hashNCCTrie = block.hashNCCTrie;
|
||||
nTime = block.nTime;
|
||||
nBits = block.nBits;
|
||||
nNonce = block.nNonce;
|
||||
@@ -211,6 +214,7 @@ public:
|
||||
if (pprev)
|
||||
block.hashPrevBlock = pprev->GetBlockHash();
|
||||
block.hashMerkleRoot = hashMerkleRoot;
|
||||
block.hashNCCTrie = hashNCCTrie;
|
||||
block.nTime = nTime;
|
||||
block.nBits = nBits;
|
||||
block.nNonce = nNonce;
|
||||
@@ -245,9 +249,10 @@ public:
|
||||
|
||||
std::string ToString() const
|
||||
{
|
||||
return strprintf("CBlockIndex(pprev=%p, nHeight=%d, merkle=%s, hashBlock=%s)",
|
||||
return strprintf("CBlockIndex(pprev=%p, nHeight=%d, merkle=%s, ncctrie=%s, hashBlock=%s)",
|
||||
pprev, nHeight,
|
||||
hashMerkleRoot.ToString(),
|
||||
hashNCCTrie.ToString(),
|
||||
GetBlockHash().ToString());
|
||||
}
|
||||
|
||||
@@ -317,6 +322,7 @@ public:
|
||||
READWRITE(this->nVersion);
|
||||
READWRITE(hashPrev);
|
||||
READWRITE(hashMerkleRoot);
|
||||
READWRITE(hashNCCTrie);
|
||||
READWRITE(nTime);
|
||||
READWRITE(nBits);
|
||||
READWRITE(nNonce);
|
||||
@@ -328,6 +334,7 @@ public:
|
||||
block.nVersion = nVersion;
|
||||
block.hashPrevBlock = hashPrev;
|
||||
block.hashMerkleRoot = hashMerkleRoot;
|
||||
block.hashNCCTrie = hashNCCTrie;
|
||||
block.nTime = nTime;
|
||||
block.nBits = nBits;
|
||||
block.nNonce = nNonce;
|
||||
|
||||
+60
-46
@@ -11,6 +11,7 @@
|
||||
#include <assert.h>
|
||||
|
||||
#include <boost/assign/list_of.hpp>
|
||||
#include <stdio.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
@@ -30,27 +31,31 @@ using namespace std;
|
||||
class CMainParams : public CChainParams {
|
||||
public:
|
||||
CMainParams() {
|
||||
strNetworkID = "main";
|
||||
consensus.nSubsidyHalvingInterval = 210000;
|
||||
strNetworkID = "lbrycrd";
|
||||
consensus.nSubsidyHalvingInterval = 2100000;
|
||||
consensus.nMajorityEnforceBlockUpgrade = 750;
|
||||
consensus.nMajorityRejectBlockOutdated = 950;
|
||||
consensus.nMajorityWindow = 1000;
|
||||
consensus.powLimit = uint256S("00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
|
||||
consensus.nPowTargetTimespan = 14 * 24 * 60 * 60; // two weeks
|
||||
consensus.nPowTargetSpacing = 10 * 60;
|
||||
consensus.powLimit = uint256S("0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
|
||||
consensus.nPowTargetTimespan = 30 * 60 * 12;//14 * 24 * 60 * 60; // two weeks
|
||||
consensus.nPowTargetSpacing = 30;
|
||||
consensus.fPowAllowMinDifficultyBlocks = false;
|
||||
/**
|
||||
* The message start string is designed to be unlikely to occur in normal data.
|
||||
* The characters are rarely used upper ASCII, not valid as UTF-8, and produce
|
||||
* a large 32-bit integer with any alignment.
|
||||
*/
|
||||
pchMessageStart[0] = 0xf9;
|
||||
pchMessageStart[1] = 0xbe;
|
||||
pchMessageStart[2] = 0xb4;
|
||||
pchMessageStart[3] = 0xd9;
|
||||
vAlertPubKey = ParseHex("04fc9702847840aaf195de8442ebecedf5b095cdbb9bc716bda9110971b28a49e0ead8564ff0db22209e0374782c093bb899692d524e9d6a6956e7c5ecbcd68284");
|
||||
pchMessageStart[0] = 0xc8;
|
||||
pchMessageStart[1] = 0xef;
|
||||
pchMessageStart[2] = 0xd9;
|
||||
pchMessageStart[3] = 0xbe;
|
||||
//pchMessageStart[0] = 0xfa;
|
||||
//pchMessageStart[1] = 0xe4;
|
||||
//pchMessageStart[2] = 0xaa;
|
||||
//pchMessageStart[3] = 0xf1;
|
||||
vAlertPubKey = ParseHex("04a887418f021a52e33c345367ba4265890f4e295426894f4e1aece407f6441b14a036efa702d6abeb2c61883e11dd00ddc193f669c23a896981c632a73f1314ae");
|
||||
nDefaultPort = 8333;
|
||||
nMinerThreads = 0;
|
||||
nMinerThreads = 2;
|
||||
nPruneAfterHeight = 100000;
|
||||
|
||||
/**
|
||||
@@ -64,32 +69,53 @@ public:
|
||||
* CTxOut(nValue=50.00000000, scriptPubKey=0x5F1DF16B2B704C8A578D0B)
|
||||
* vMerkleTree: 4a5e1e
|
||||
*/
|
||||
const char* pszTimestamp = "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks";
|
||||
const char* pszTimestamp = "insert timestamp string";//"The Times 03/Jan/2009 Chancellor on brink of second bailout for banks";
|
||||
CMutableTransaction txNew;
|
||||
txNew.nVersion = 1;
|
||||
txNew.vin.resize(1);
|
||||
txNew.vout.resize(1);
|
||||
txNew.vin[0].scriptSig = CScript() << 486604799 << CScriptNum(4) << vector<unsigned char>((const unsigned char*)pszTimestamp, (const unsigned char*)pszTimestamp + strlen(pszTimestamp));
|
||||
txNew.vout[0].nValue = 50 * COIN;
|
||||
txNew.vout[0].scriptPubKey = CScript() << ParseHex("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f") << OP_CHECKSIG;
|
||||
//txNew.vout[0].scriptPubKey = CScript() << ParseHex("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f") << OP_CHECKSIG;
|
||||
//txNew.vout[0].scriptPubKey = CScript() << ParseHex("0425caecb9fbf6cf50979644e85c11e3ec9007fd477fab9683648c6539e59b59c3a4d9b9c0b552c37eee6476f3e0d8425ac0346fe69ad61628b8c340d42fbfa3fd") << OP_CHECKSIG;
|
||||
//txNew.vout[0].scriptPubKey = CScript() << OP_DUP << OP_HASH160 << ParseHex("e5ff2d9e3a254622ae493573169c0fa94c82fe4f") << OP_EQUALVERIFY << OP_CHECKSIG;
|
||||
txNew.vout[0].scriptPubKey = CScript() << OP_DUP << OP_HASH160 << ParseHex("345991dbf57bfb014b87006acdfafbfc5fe8292f") << OP_EQUALVERIFY << OP_CHECKSIG;
|
||||
genesis.vtx.push_back(txNew);
|
||||
genesis.hashPrevBlock.SetNull();
|
||||
genesis.hashMerkleRoot = genesis.BuildMerkleTree();
|
||||
genesis.hashNCCTrie = uint256S("0x0000000000000000000000000000000000000000000000000000000000000001");
|
||||
genesis.nVersion = 1;
|
||||
genesis.nTime = 1231006505;
|
||||
genesis.nBits = 0x1d00ffff;
|
||||
genesis.nNonce = 2083236893;
|
||||
genesis.nTime = 1417453734;
|
||||
genesis.nBits = 0x1f00ffff;
|
||||
genesis.nNonce = 7885;
|
||||
|
||||
/*bool found = false;
|
||||
while (!found)
|
||||
{
|
||||
genesis.nNonce += 1;
|
||||
consensus.hashGenesisBlock = genesis.GetHash();
|
||||
if (CheckProofOfWork2(consensus.hashGenesisBlock, consensus.powLimit.GetCompact(), consensus))
|
||||
{
|
||||
std::cout << "nonce: " << genesis.nNonce << std::endl;
|
||||
std::cout << "hex: " << consensus.hashGenesisBlock.GetHex() << std::endl;
|
||||
found = true;
|
||||
}
|
||||
}*/
|
||||
|
||||
consensus.hashGenesisBlock = genesis.GetHash();
|
||||
assert(consensus.hashGenesisBlock == uint256S("0x000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f"));
|
||||
assert(genesis.hashMerkleRoot == uint256S("0x4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b"));
|
||||
//printf("hex: %s\n", consensus.hashGenesisBlock.GetHex().c_str());
|
||||
//assert(consensus.hashGenesisBlock == uint256S("0x000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f"));
|
||||
//assert(consensus.hashGenesisBlock == uint256S("0x00ef6ded2b610fc5e4f06d187d12136bd5fba7b932fa0b66bf353c7c1648ec9c"));
|
||||
assert(consensus.hashGenesisBlock == uint256S("0x0000343f59c49eb433ba3a37ee4b3493ff014ee9b266f610bb3cd1b36927787a"));
|
||||
//printf("%s\n", genesis.hashMerkleRoot.GetHex().c_str());
|
||||
//assert(genesis.hashMerkleRoot == uint256("0x4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b"));
|
||||
//assert(genesis.hashMerkleRoot == uint256S("0xa7d51d407092059a2beeffab22e65d6176cfb3c33b93515109480aa7c81c9141"));
|
||||
assert(genesis.hashMerkleRoot == uint256S("0x93621531f4de4b27d4ffdf785ef12855f2b18687e2141466ff50e2848d83f551"));
|
||||
|
||||
vSeeds.push_back(CDNSSeedData("bitcoin.sipa.be", "seed.bitcoin.sipa.be")); // Pieter Wuille
|
||||
vSeeds.push_back(CDNSSeedData("bluematt.me", "dnsseed.bluematt.me")); // Matt Corallo
|
||||
vSeeds.push_back(CDNSSeedData("dashjr.org", "dnsseed.bitcoin.dashjr.org")); // Luke Dashjr
|
||||
vSeeds.push_back(CDNSSeedData("bitcoinstats.com", "seed.bitcoinstats.com")); // Christian Decker
|
||||
vSeeds.push_back(CDNSSeedData("xf2.org", "bitseed.xf2.org")); // Jeff Garzik
|
||||
vSeeds.push_back(CDNSSeedData("bitcoin.jonasschnelli.ch", "seed.bitcoin.jonasschnelli.ch")); // Jonas Schnelli
|
||||
vSeeds.clear();
|
||||
vFixedSeeds.clear();
|
||||
|
||||
vSeeds.push_back(CDNSSeedData("lbrycrd.lbry.io", "testseed.lbrycrd.lbry.io")); // lbry.io
|
||||
|
||||
base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,0);
|
||||
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,5);
|
||||
@@ -108,23 +134,11 @@ public:
|
||||
|
||||
checkpointData = (Checkpoints::CCheckpointData) {
|
||||
boost::assign::map_list_of
|
||||
( 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")),
|
||||
1397080064, // * UNIX timestamp of last checkpoint block
|
||||
36544669, // * total number of transactions between genesis and last checkpoint
|
||||
( 0, uint256S("0x0000343f59c49eb433ba3a37ee4b3493ff014ee9b266f610bb3cd1b36927787a")),
|
||||
1417453734, // * UNIX timestamp of last checkpoint block
|
||||
1, // * total number of transactions between genesis and last checkpoint
|
||||
// (the tx=... number in the SetBestChain debug.log lines)
|
||||
60000.0 // * estimated number of transactions per day after checkpoint
|
||||
0.0 // * estimated number of transactions per day after checkpoint
|
||||
};
|
||||
}
|
||||
};
|
||||
@@ -154,14 +168,14 @@ public:
|
||||
genesis.nTime = 1296688602;
|
||||
genesis.nNonce = 414098458;
|
||||
consensus.hashGenesisBlock = genesis.GetHash();
|
||||
assert(consensus.hashGenesisBlock == uint256S("0x000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943"));
|
||||
//assert(consensus.hashGenesisBlock == uint256("0x000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943"));
|
||||
|
||||
vFixedSeeds.clear();
|
||||
vSeeds.clear();
|
||||
vSeeds.push_back(CDNSSeedData("alexykot.me", "testnet-seed.alexykot.me"));
|
||||
vSeeds.push_back(CDNSSeedData("bitcoin.petertodd.org", "testnet-seed.bitcoin.petertodd.org"));
|
||||
vSeeds.push_back(CDNSSeedData("bluematt.me", "testnet-seed.bluematt.me"));
|
||||
vSeeds.push_back(CDNSSeedData("bitcoin.schildbach.de", "testnet-seed.bitcoin.schildbach.de"));
|
||||
//vSeeds.push_back(CDNSSeedData("alexykot.me", "testnet-seed.alexykot.me"));
|
||||
//vSeeds.push_back(CDNSSeedData("bitcoin.petertodd.org", "testnet-seed.bitcoin.petertodd.org"));
|
||||
//vSeeds.push_back(CDNSSeedData("bluematt.me", "testnet-seed.bluematt.me"));
|
||||
//vSeeds.push_back(CDNSSeedData("bitcoin.schildbach.de", "testnet-seed.bitcoin.schildbach.de"));
|
||||
|
||||
base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,111);
|
||||
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,196);
|
||||
@@ -212,7 +226,7 @@ public:
|
||||
genesis.nNonce = 2;
|
||||
consensus.hashGenesisBlock = genesis.GetHash();
|
||||
nDefaultPort = 18444;
|
||||
assert(consensus.hashGenesisBlock == uint256S("0x0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206"));
|
||||
//assert(consensus.hashGenesisBlock == uint256("0x0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206"));
|
||||
nPruneAfterHeight = 1000;
|
||||
|
||||
vFixedSeeds.clear(); //! Regtest mode doesn't have any fixed seeds.
|
||||
|
||||
+2
-537
@@ -8,545 +8,10 @@
|
||||
* IPv4 as well as onion addresses are wrapped inside a IPv6 address accordingly.
|
||||
*/
|
||||
static SeedSpec6 pnSeed6_main[] = {
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x01,0x21,0xc5,0x6e}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x01,0x22,0xb4,0xf5}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x01,0xca,0x80,0xda}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x02,0x23,0xc3,0x19}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x64,0x7b,0x13}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0xaf,0x91,0xa9}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0xc7,0x85,0xc1}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0xc7,0x97,0x0a}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0xe4,0x01,0xe6}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x0e,0xc8,0xc8,0x91}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x12,0xe4,0x00,0xbc}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x12,0xe4,0x00,0xc8}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0x1e,0xf3,0x99}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0x58,0xe8,0x31}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0x63,0x69,0x09}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0xe2,0x89,0xd0}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0xe3,0xb1,0xa1}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0xe3,0xbf,0x32}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0xe5,0x2d,0x20}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0xec,0x90,0x45}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0xfd,0x94,0x71}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0xfd,0xf1,0x16}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0xff,0xe3,0xe7}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0x14,0xcd,0xde}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0x17,0x78,0xfc}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0x5e,0x62,0x60}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0x62,0x5f,0xc9}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0x6f,0x5a,0x37}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0x77,0x77,0x69}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0x8a,0x19,0x95}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x1f,0x03,0xd6,0x2d}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x1f,0xba,0x57,0x2e}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x1f,0xba,0x65,0x62}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x1f,0xba,0xfa,0xba}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x1f,0xcc,0x99,0x6b}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0x2c,0x10,0xe7}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0x2c,0x2c,0x0b}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0x78,0xa8,0xcc}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0x8f,0x56,0x1a}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0xbb,0x4b,0x18}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0xbc,0x44,0xa9}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0xc0,0x5f,0x96}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0xc9,0xf6,0x74}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0xcd,0x0a,0x8c}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0x0a,0xd2,0x11}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0x13,0x8a,0x9a}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0x1c,0xcc,0x7b}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0x1c,0xcd,0x43}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0x26,0xeb,0xe5}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0xa3,0x4c,0xe6}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0xa6,0xa2,0x5b}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0xad,0xbe,0x32}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0xe3,0x42,0x84}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0xe5,0xee,0xbb}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0xec,0x74,0xd1}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2f,0x37,0x0e,0x41}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x07,0xfc,0xe5}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x2e,0x9f,0x5b}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x4e,0x31,0xb5}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x4e,0xe7,0x39}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x4f,0x99,0x41}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x74,0x22,0x2c}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x7e,0x56,0xfd}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x8e,0x29,0x17}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0xc7,0x71,0xc1}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0xc8,0x4e,0x6b}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0xce,0x8a,0xb1}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0xfc,0x34,0x31}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xa5,0x19,0x4b}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xa9,0x6b,0x28}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xb3,0xbe,0x38}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xbb,0x52,0x79}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xf6,0x55,0xf6}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3a,0x4a,0x07,0xcd}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3a,0x60,0xb7,0x79}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3d,0x3e,0x3a,0x26}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3d,0x3f,0x5b,0x48}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3d,0x3f,0x5b,0x70}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3d,0x48,0xd3,0xe4}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3e,0x2b,0x28,0x9a}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3e,0x2b,0x82,0xb2}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3e,0x50,0xb9,0xd5}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3e,0x6d,0x31,0x1a}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3e,0xad,0x8b,0x3a}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3e,0xb5,0xee,0xba}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3e,0xd2,0x72,0x7f}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3f,0x8d,0xe4,0x8a}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3f,0x99,0xd5,0x4e}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3f,0xdf,0x54,0x91}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3f,0xfb,0x58,0x70}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x40,0x1f,0x6e,0x32}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x40,0x22,0x79,0x2d}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x40,0x72,0x06,0x2a}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x40,0x8c,0x7d,0x62}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x40,0x9c,0xc1,0x64}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x41,0x1e,0x2f,0x74}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x41,0x23,0x84,0xb1}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x41,0x60,0xc1,0xa5}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x41,0x6f,0xbd,0x1a}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x42,0x44,0x0a,0x1e}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x42,0x72,0x21,0xfa}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x42,0x82,0x2e,0x3f}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x42,0xaf,0xd7,0x87}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x42,0xbe,0xfd,0xa5}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x42,0xc2,0x26,0xfe}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x42,0xf4,0x62,0x6f}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x43,0xa2,0xee,0x1e}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x43,0xa9,0xff,0x11}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x43,0xb7,0xad,0x19}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x43,0xdb,0xe9,0x8c}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x43,0xe3,0xf0,0x73}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x43,0xf7,0xde,0x47}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x44,0x2b,0x72,0x42}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x44,0x34,0x21,0x24}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x44,0xc6,0xf5,0xf1}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0x0c,0xe2,0xa5}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0x0d,0xc6,0xbc}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0x0f,0xb3,0x3e}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0x27,0xef,0x2f}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0x2f,0x2d,0x57}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0x3e,0xd9,0xce}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0x40,0x2a,0x1f}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0x40,0x51,0x3d}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0x43,0xdb,0xc8}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0x5a,0x84,0x9d}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0x5e,0x1e,0xb1}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0x88,0xaf,0xf1}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x46,0x3d,0x61,0xe4}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x46,0x7b,0x76,0x84}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x47,0x3b,0x98,0xb6}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x47,0xc6,0xf8,0x97}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x47,0xc8,0xf2,0x59}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x47,0xe1,0xb3,0x9d}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x48,0x0e,0xbb,0x33}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x48,0x26,0x22,0xb4}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x48,0x34,0x48,0xbb}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x48,0x5b,0x90,0xb6}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x48,0xa7,0x31,0xd9}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x48,0xc9,0xf3,0x37}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x48,0xdf,0x3c,0xf9}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x48,0xe4,0x99,0x66}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x49,0x1a,0x65,0xe4}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x49,0x32,0x9e,0xc8}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x49,0xb5,0xcc,0xaa}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4a,0x39,0xc7,0xb4}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4a,0x3f,0xde,0xe2}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4a,0x51,0xe7,0x15}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4a,0xc1,0x7e,0x52}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4a,0xcf,0xeb,0xa4}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4b,0x53,0xc5,0x72}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4b,0x90,0x72,0x09}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4c,0x70,0x05,0xf7}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4c,0xae,0x14,0xf7}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4d,0x25,0xf0,0x8e}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4d,0x39,0xca,0x6b}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4d,0xac,0x7b,0x35}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4d,0xdd,0x5b,0xfd}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4d,0xeb,0x30,0x30}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4d,0xf5,0x4e,0x02}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x08,0x3a,0xf9}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x1b,0xbf,0xb6}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x81,0xec,0x8d}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x83,0x58,0x2f}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x9d,0xcd,0x06}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4f,0x84,0xe6,0x90}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4f,0x8f,0xbc,0x9b}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4f,0xa0,0xdd,0x8c}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4f,0xa1,0x6f,0x72}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x50,0x64,0xbd,0x03}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x50,0x93,0x8c,0x79}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x50,0xcb,0x4b,0x85}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x50,0xdc,0x63,0xe3}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x50,0xde,0x14,0xa9}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x50,0xf1,0x01,0x07}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x51,0x17,0xbf,0xf3}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x51,0x26,0x0b,0xca}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x51,0x50,0x09,0x47}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x51,0x6e,0xd5,0xa5}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x51,0x85,0x9b,0xed}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x51,0xab,0x22,0x25}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x51,0xb5,0x9b,0xb4}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0x27,0x9c,0x89}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0x49,0xa1,0x5f}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0x82,0x2d,0x28}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xa5,0x99,0x2f}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xa8,0x80,0x85}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xb3,0xe1,0x76}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xc2,0xf5,0x9e}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xc7,0x66,0x0a}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xd3,0x1e,0xf3}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xd9,0x85,0x91}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xdd,0x80,0x23}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xdd,0x83,0xb1}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xe9,0xe1,0xcd}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0x00,0xf9,0x92}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0x59,0x1f,0xf9}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0x80,0x1d,0xe7}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0x80,0xfd,0x8e}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0x8f,0x82,0x38}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0x96,0x02,0x63}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0x96,0x09,0xc4}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0xa1,0x40,0x2d}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0xd4,0x67,0xd4}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0xd4,0x6f,0x72}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0xf6,0x4b,0x08}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0xfe,0x51,0x1f}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0xfe,0x96,0x36}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x54,0x02,0x22,0x68}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x54,0x0f,0x3d,0x3c}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x54,0x11,0x19,0x87}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x54,0x2a,0x90,0x13}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x54,0xd4,0xd2,0x87}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x54,0xd7,0xa5,0xe7}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x54,0xee,0x8c,0xb0}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x54,0xf0,0x1f,0xb8}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x55,0x19,0xd6,0x89}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x55,0x8b,0xa3,0x84}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x55,0xc7,0x04,0xe4}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x55,0xd6,0x3d,0xd1}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x55,0xd6,0x6c,0x4d}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x56,0x7b,0x10,0x11}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x57,0x30,0x2a,0xc7}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x57,0x68,0xa8,0x68}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x57,0xe5,0x49,0xab}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x57,0xec,0xc4,0x4d}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0x61,0x38,0x62}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0x86,0xb2,0x59}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0x96,0xe9,0x13}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0xa8,0x85,0x03}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0xd0,0x12,0xf6}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0xd0,0x21,0xca}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x59,0x12,0x1c,0x15}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x59,0x55,0xdc,0x54}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x59,0xa3,0xe3,0x1c}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x59,0xb8,0x53,0x3c}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x59,0xe7,0x60,0x53}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x59,0xec,0x31,0x75}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0x5a,0x42,0xd1}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0x6a,0xc2,0x61}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0x86,0x4b,0x73}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0x98,0xc1,0x24}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0x98,0xdb,0x23}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xc5,0x0a,0xea}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xd1,0x4d,0x65}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xd2,0x6a,0x93}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xd6,0xc8,0xcd}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xdf,0x73,0x26}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xea,0x30,0xe8}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xfa,0x56,0x12}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5c,0x1b,0x07,0xd1}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5c,0xff,0xcf,0x49}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5d,0x4a,0xa3,0xea}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5d,0x54,0x72,0x6a}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5d,0x98,0xa6,0x1d}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5d,0xab,0xd8,0xdd}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5d,0xb9,0xb1,0x47}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0x13,0x0c,0xf4}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0x2a,0x73,0x32}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0x4f,0xb1,0xce}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0x88,0x93,0x77}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0x8f,0xf5,0x05}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0xbc,0x32,0x27}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0xbe,0xe3,0x70}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0xc6,0x87,0x1d}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0xe2,0x6b,0x56}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0xf2,0xdb,0x5a}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0xf2,0xe5,0xa8}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0xf4,0xa0,0x54}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0x1f,0x0a,0xd1}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0x55,0x19,0x29}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0x69,0xa1,0x88}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0x9a,0xa5,0x2d}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0x9a,0xc8,0xd8}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0xa7,0x6d,0x7d}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0xd3,0x7d,0xe7}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0xd3,0xd8,0xeb}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x60,0x21,0x19,0x11}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x60,0x2b,0x82,0xb2}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x61,0x76,0x08,0xec}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x62,0x66,0x06,0x7d}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x62,0xca,0x14,0x2d}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x62,0xd9,0x7d,0xe1}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x62,0xea,0xd2,0x6f}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x62,0xed,0x14,0x7b}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x62,0xff,0x90,0xb0}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x63,0x71,0x40,0x2b}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x63,0xe5,0x16,0x08}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x67,0x01,0xd4,0x13}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x67,0x1e,0x2a,0xbd}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x67,0xe0,0xa5,0x30}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x67,0xf3,0x5e,0x8c}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x68,0x83,0x6b,0x6b}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x68,0x83,0x74,0xb8}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x68,0x8f,0x00,0x9c}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x68,0xdb,0xb8,0x09}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6a,0xb9,0x26,0xae}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6b,0x06,0x04,0x91}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6b,0x96,0x08,0x1b}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6b,0x96,0x21,0x14}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6b,0xaa,0xe4,0x81}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6b,0xaa,0xf0,0xad}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0x33,0x14,0x56}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0x3d,0x95,0xde}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0x3d,0x97,0xac}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0xa1,0x81,0xf7}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0xaa,0x8c,0x15}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0x3c,0xd3,0xd8}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0x49,0x2a,0x24}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0x49,0xac,0x8a}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0xa3,0xeb,0xef}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0xbe,0xc4,0xdc}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0xc9,0x87,0xd8}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0xe4,0x98,0x02}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0xe4,0x9a,0x51}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0xe6,0xdc,0x7d}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0xea,0x9c,0xda}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0xeb,0x31,0x1b}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0xeb,0x45,0x54}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x70,0x7c,0x47,0x00}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x71,0x92,0x44,0xfb}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x73,0x1d,0x11,0x52}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x73,0x46,0xb0,0x11}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x75,0x29,0xa2,0xb8}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x76,0x1b,0x08,0xaa}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x77,0xe6,0x07,0xd3}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x77,0xf6,0x47,0x34}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x79,0xac,0x08,0x64}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x7a,0x80,0x6d,0x94}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x7b,0xe7,0xe0,0x3f}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x80,0xaf,0xc3,0x1f}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x80,0xc7,0xa4,0x60}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x80,0xc7,0xfe,0xf4}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x81,0x61,0x45,0x4c}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x81,0x7b,0x07,0x07}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x81,0x7b,0x07,0x27}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x81,0xba,0x11,0x11}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x83,0xf7,0xa9,0xbe}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x85,0xf2,0xd1,0x3f}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x86,0x66,0x5e,0x26}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x86,0x77,0x11,0x91}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x89,0x74,0xa0,0xb0}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x89,0xe2,0x22,0x2a}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x8a,0xd2,0xd9,0xaa}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x8d,0xff,0xa6,0xc2}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x8f,0xd7,0x81,0x7e}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x90,0x4c,0xf4,0x13}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x92,0x94,0x34,0xa2}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x92,0x94,0x50,0x39}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x92,0xb9,0x13,0x1e}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x92,0xb9,0x8e,0x56}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x92,0xb9,0xfd,0x33}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x94,0xfb,0x06,0xd6}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x95,0x9a,0x9b,0xeb}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x95,0xd2,0x85,0xf4}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x97,0xe0,0xf8,0xfc}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x99,0x79,0x4b,0xe5}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x99,0x7f,0xfb,0x43}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x9a,0x14,0x02,0x8b}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x9d,0x0d,0x3d,0x05}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x9e,0x3a,0xad,0x30}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x9f,0xfd,0x17,0x84}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa2,0xd1,0x6e,0xda}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa2,0xd5,0xfe,0xcd}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa2,0xef,0xfe,0x64}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa2,0xf2,0x96,0x27}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa2,0xf3,0x51,0x8a}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa2,0xf3,0xeb,0x38}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa2,0xf4,0x4f,0x10}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa2,0xf5,0xd9,0x77}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa2,0xf8,0x66,0x75}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa2,0xfb,0x6c,0x35}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa2,0xfe,0x95,0x8b}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa2,0xff,0x74,0x4e}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa6,0x46,0x5e,0x6a}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa7,0x58,0x2d,0x7c}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa7,0x58,0x78,0xd2}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0x1a,0x31,0x2b}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0x1e,0x0e,0x06}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0x50,0x72,0xc5}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0xa7,0xd6,0xf3}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0xd0,0xdb,0x6c}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0xdc,0x43,0x9c}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0xec,0x65,0x22}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0xf6,0x6b,0x22}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0xff,0xed,0xf1}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xae,0x02,0xd5,0xd1}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xae,0x33,0x17,0xe0}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xae,0x33,0x7b,0x9f}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xae,0x39,0xd4,0x79}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xae,0x6d,0x21,0x1c}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xaf,0x7e,0x7c,0x5b}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xaf,0x7e,0x7c,0x5c}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb0,0x0a,0x74,0xf2}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb0,0x24,0x23,0x7e}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb0,0x24,0x63,0xde}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb0,0x7c,0x6e,0x2f}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb0,0xc2,0x21,0x2c}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb0,0xdf,0xc9,0xc6}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0x3e,0x1a,0x53}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0x3e,0x24,0x30}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0x3e,0xd4,0x8d}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0x3e,0xfe,0x3b}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0x4e,0xfa,0x03}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0x9b,0x56,0xe2}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0xaf,0x86,0x23}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0xf8,0x6f,0x04}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0xfe,0x01,0xaa}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0xfe,0x22,0xa1}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb3,0x2b,0x72,0x0e}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb6,0xd5,0xd0,0x1c}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb8,0x44,0x02,0x2e}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb8,0x48,0xee,0x2a}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb8,0x5e,0xe2,0x22}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb8,0x5e,0xe3,0x3a}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb8,0x6b,0x8b,0x3a}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb8,0x6b,0xce,0x2d}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x0a,0x30,0x75}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x15,0xd8,0x9c}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x26,0x2f,0xe0}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x2d,0xc0,0x81}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x35,0x81,0xe6}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x35,0x83,0x72}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x37,0x35,0x3d}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x37,0x35,0x3f}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x3d,0x77,0x02}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x3d,0x94,0xcb}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xba,0x02,0xa7,0x17}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0x5c,0x4b,0xb2}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0x7a,0x5c,0x86}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0x8a,0x09,0xd0}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0xa5,0xd1,0x94}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0xe2,0xce,0xef}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbe,0x0a,0x08,0x7c}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbe,0x0a,0x0a,0x93}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0x00,0x82,0x8e}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0x03,0x59,0x9f}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0x49,0xea,0x8a}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0x4b,0x5f,0x6b}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0x5f,0x64,0x66}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0x9b,0x54,0xb5}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0xa9,0xe9,0xce}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0xc6,0x5d,0x56}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0xe3,0x87,0xd8}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc1,0x00,0x6d,0x03}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc1,0x4d,0x32,0xd0}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc1,0x6d,0x44,0x3e}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc1,0x96,0x79,0x25}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc1,0xe0,0x45,0x62}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc2,0x4f,0x08,0x25}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc2,0x8d,0x56,0x0a}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc3,0x0c,0xb4,0x5e}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc3,0x38,0x3f,0x0a}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc3,0x74,0x5d,0x5d}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc3,0x9a,0xae,0xe2}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc3,0x9f,0x6f,0x62}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc3,0xa9,0x8a,0x02}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc3,0xbd,0x7e,0x23}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc3,0xc5,0xaf,0xbe}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc5,0xf2,0x5d,0x52}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x0b,0xd6,0x93}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x31,0x29,0x15}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc7,0x21,0x7c,0xba}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc7,0xcc,0xba,0x92}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc7,0xe9,0xee,0x73}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc7,0xf1,0xbd,0x42}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xca,0x3c,0x44,0xf2}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xca,0x3c,0x45,0xe8}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xcb,0xb7,0x97,0x27}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xcb,0xdb,0x0e,0xcc}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xcc,0x2c,0x7b,0x6d}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xcc,0x2c,0x7b,0xa2}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xcc,0x2d,0x78,0xb2}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xce,0xbe,0x86,0x2c}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xce,0xf8,0xb8,0x7f}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xcf,0xf4,0x49,0x08}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd0,0x42,0x1e,0x1b}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd1,0x51,0x09,0xdf}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd1,0x69,0xf3,0xe5}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd1,0x7e,0x46,0x9f}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd1,0x8c,0x1e,0xa9}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd1,0xa5,0x80,0xeb}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd1,0xbe,0x02,0xf2}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd2,0x42,0xfe,0xec}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd2,0x49,0x1b,0x21}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd3,0x48,0x42,0xe5}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd4,0x19,0x25,0x7c}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd4,0x47,0xeb,0x72}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd4,0x47,0xfc,0x6d}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd4,0x72,0x30,0x1f}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd4,0xae,0x97,0x76}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0x42,0xcd,0xc2}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0x81,0xf8,0x8b}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0x88,0x57,0x22}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0xa5,0x52,0x85}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0xa7,0x11,0x06}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0xb3,0x9e,0xfd}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0xbd,0x35,0x7d}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0xde,0xd0,0x5d}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd8,0x31,0x9e,0xa1}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd8,0x37,0x8f,0x9a}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd8,0x83,0x5b,0x64}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd8,0xf5,0xce,0xb5}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd8,0xfa,0x8a,0xe6}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd9,0x0b,0xe1,0xbd}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd9,0x17,0x06,0x85}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd9,0x4b,0x58,0xb2}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd9,0xac,0x8f,0x8c}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd9,0xc3,0xa9,0xd1}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd9,0xc4,0xf8,0x6a}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xdb,0x8a,0xa1,0xa2}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xde,0xa7,0xf8,0x5a}, 8333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xdf,0x12,0xfe,0x37}, 8333},
|
||||
{{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0x0a,0x26,0x27,0x21,0xae,0x94,0xd5,0xc2,0x72,0x24}, 8333},
|
||||
{{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0xea,0xb9,0x5b,0x63,0x1d,0x94,0xe2,0xed,0xec,0xa1}, 8333},
|
||||
{{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0xce,0x36,0xa1,0xc1,0xd6,0x64,0x43,0xfb,0xb3,0xe7}, 8333},
|
||||
{{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0x26,0xe6,0xdf,0xeb,0xe5,0xc5,0x9a,0x87,0x5e,0x22}, 8333},
|
||||
{{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0x52,0x71,0xa2,0x43,0x2a,0xe6,0x6c,0x8e,0xe4,0x7b}, 8333},
|
||||
{{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0x7c,0xf4,0x0b,0x4c,0x52,0xd5,0x16,0xcf,0xf5,0x06}, 8333},
|
||||
{{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0x98,0xff,0x33,0x38,0xbb,0x43,0x08,0x8d,0x95,0x9e}, 8333},
|
||||
{{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0x16,0x64,0x1b,0x1f,0x8f,0x87,0x18,0x7d,0xa3,0x2b}, 8333},
|
||||
{{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0xb8,0xda,0x83,0x67,0x90,0x6f,0x46,0x10,0xdb,0x53}, 8333},
|
||||
{{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0xc3,0x1b,0x22,0x8c,0x89,0x60,0xbf,0xca,0x88,0xa1}, 7033},
|
||||
{{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0x4d,0xe3,0x5b,0x75,0x10,0x46,0x5e,0xf0,0x99,0x8b}, 8333},
|
||||
{{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0x0a,0xba,0x44,0x94,0x9d,0xf5,0xc0,0xaa,0xcd,0x4a}, 8333},
|
||||
{{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0x96,0x64,0xce,0x6d,0xd4,0xfb,0xa7,0x6b,0x60,0xb5}, 8333},
|
||||
{{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0xe9,0x8f,0x0b,0x72,0xc9,0xf1,0xde,0x62,0xd4,0x66}, 8333},
|
||||
{{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0x25,0x5c,0xbc,0x34,0xe8,0x9f,0xe4,0x7c,0x90,0x93}, 8333},
|
||||
{{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0xe0,0xa2,0x72,0xef,0xfa,0x7b,0x88,0x95,0x8b,0x9c}, 8333},
|
||||
{{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0x99,0x69,0xc5,0x40,0xa7,0x95,0xbb,0x25,0xc1,0xfa}, 8333},
|
||||
{{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0x46,0xa3,0xd9,0x84,0x08,0xc8,0x7f,0xd3,0xeb,0xc5}, 8333},
|
||||
{{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0x0c,0xc4,0xd2,0x4f,0x74,0x99,0xb3,0x8c,0xe8,0x25}, 8333},
|
||||
{{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0xac,0x9d,0xb8,0xf8,0x4c,0x4b,0x9c,0xc3,0x9c,0xc6}, 8333},
|
||||
{{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0x7c,0x1d,0x28,0x9f,0xd6,0x28,0x28,0x22,0x4f,0x7a}, 8333},
|
||||
{{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0xce,0x36,0xa1,0xc1,0xd6,0x64,0x43,0xfb,0xb3,0xe7}, 8333},
|
||||
{{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0x8f,0x06,0x4e,0x64,0xbc,0x5e,0x1a,0x8a,0x71,0x97}, 8444}
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x34,0x1b,0x4e,0x38}, 8333}
|
||||
};
|
||||
|
||||
static SeedSpec6 pnSeed6_test[] = {
|
||||
{{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0x99,0xcb,0x26,0x31,0xba,0x48,0x51,0x31,0x39,0x0d}, 18333},
|
||||
{{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0x44,0xf4,0xf4,0xf0,0xbf,0xf7,0x7e,0x6d,0xc4,0xe8}, 18333}
|
||||
|
||||
};
|
||||
#endif // BITCOIN_CHAINPARAMSSEEDS_H
|
||||
+18
-8
@@ -185,6 +185,8 @@ void Shutdown()
|
||||
pcoinsdbview = NULL;
|
||||
delete pblocktree;
|
||||
pblocktree = NULL;
|
||||
delete pnccTrie;
|
||||
pnccTrie = NULL;
|
||||
}
|
||||
#ifdef ENABLE_WALLET
|
||||
if (pwalletMain)
|
||||
@@ -270,7 +272,7 @@ std::string HelpMessage(HelpMessageMode mode)
|
||||
strUsage += HelpMessageOpt("-blocknotify=<cmd>", _("Execute command when the best block changes (%s in cmd is replaced by block hash)"));
|
||||
strUsage += HelpMessageOpt("-checkblocks=<n>", strprintf(_("How many blocks to check at startup (default: %u, 0 = all)"), 288));
|
||||
strUsage += HelpMessageOpt("-checklevel=<n>", strprintf(_("How thorough the block verification of -checkblocks is (0-4, default: %u)"), 3));
|
||||
strUsage += HelpMessageOpt("-conf=<file>", strprintf(_("Specify configuration file (default: %s)"), "bitcoin.conf"));
|
||||
strUsage += HelpMessageOpt("-conf=<file>", strprintf(_("Specify configuration file (default: %s)"), "lbrycrd.conf"));
|
||||
if (mode == HMM_BITCOIND)
|
||||
{
|
||||
#if !defined(WIN32)
|
||||
@@ -284,7 +286,7 @@ std::string HelpMessage(HelpMessageMode mode)
|
||||
strUsage += HelpMessageOpt("-par=<n>", strprintf(_("Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d)"),
|
||||
-(int)boost::thread::hardware_concurrency(), MAX_SCRIPTCHECK_THREADS, DEFAULT_SCRIPTCHECK_THREADS));
|
||||
#ifndef WIN32
|
||||
strUsage += HelpMessageOpt("-pid=<file>", strprintf(_("Specify pid file (default: %s)"), "bitcoind.pid"));
|
||||
strUsage += HelpMessageOpt("-pid=<file>", strprintf(_("Specify pid file (default: %s)"), "lbrycrdd.pid"));
|
||||
#endif
|
||||
strUsage += HelpMessageOpt("-prune=<n>", strprintf(_("Reduce storage requirements by pruning (deleting) old blocks. This mode disables wallet support and is incompatible with -txindex. "
|
||||
"Warning: Reverting this setting requires re-downloading the entire blockchain. "
|
||||
@@ -872,7 +874,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
||||
|
||||
// Sanity check
|
||||
if (!InitSanityCheck())
|
||||
return InitError(_("Initialization sanity check failed. Bitcoin Core is shutting down."));
|
||||
return InitError(_("Initialization sanity check failed. LBRYcrd Core is shutting down."));
|
||||
|
||||
std::string strDataDir = GetDataDir().string();
|
||||
#ifdef ENABLE_WALLET
|
||||
@@ -888,9 +890,9 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
||||
try {
|
||||
static boost::interprocess::file_lock lock(pathLockFile.string().c_str());
|
||||
if (!lock.try_lock())
|
||||
return InitError(strprintf(_("Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running."), strDataDir));
|
||||
return InitError(strprintf(_("Cannot obtain a lock on data directory %s. LBRYcrd Core is probably already running."), strDataDir));
|
||||
} catch(const boost::interprocess::interprocess_exception& e) {
|
||||
return InitError(strprintf(_("Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.") + " %s.", strDataDir, e.what()));
|
||||
return InitError(strprintf(_("Cannot obtain a lock on data directory %s. LBRYcrd Core is probably already running.") + " %s.", strDataDir, e.what()));
|
||||
}
|
||||
|
||||
#ifndef WIN32
|
||||
@@ -899,7 +901,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
||||
if (GetBoolArg("-shrinkdebugfile", !fDebug))
|
||||
ShrinkDebugFile();
|
||||
LogPrintf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
|
||||
LogPrintf("Bitcoin version %s (%s)\n", FormatFullVersion(), CLIENT_DATE);
|
||||
LogPrintf("LBRYcrd version %s (%s)\n", FormatFullVersion(), CLIENT_DATE);
|
||||
LogPrintf("Using OpenSSL version %s\n", SSLeay_version(SSLEAY_VERSION));
|
||||
#ifdef ENABLE_WALLET
|
||||
LogPrintf("Using BerkeleyDB version %s\n", DbEnv::version(0, 0, 0));
|
||||
@@ -1118,11 +1120,13 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
||||
delete pcoinsdbview;
|
||||
delete pcoinscatcher;
|
||||
delete pblocktree;
|
||||
delete pnccTrie;
|
||||
|
||||
pblocktree = new CBlockTreeDB(nBlockTreeDBCache, false, fReindex);
|
||||
pcoinsdbview = new CCoinsViewDB(nCoinDBCache, false, fReindex);
|
||||
pcoinscatcher = new CCoinsViewErrorCatcher(pcoinsdbview);
|
||||
pcoinsTip = new CCoinsViewCache(pcoinscatcher);
|
||||
pnccTrie = new CNCCTrie(false, fReindex);
|
||||
|
||||
if (fReindex) {
|
||||
pblocktree->WriteReindexing(true);
|
||||
@@ -1152,6 +1156,12 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
||||
strLoadError = _("You need to rebuild the database using -reindex to change -txindex");
|
||||
break;
|
||||
}
|
||||
|
||||
if (!pnccTrie->ReadFromDisk(true))
|
||||
{
|
||||
strLoadError = _("Error loading the ncc trie from disk");
|
||||
break;
|
||||
}
|
||||
|
||||
// Check for changed -prune state. What we are concerned about is a user who has pruned blocks
|
||||
// in the past, but is now trying to run unpruned.
|
||||
@@ -1265,10 +1275,10 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
||||
InitWarning(msg);
|
||||
}
|
||||
else if (nLoadWalletRet == DB_TOO_NEW)
|
||||
strErrors << _("Error loading wallet.dat: Wallet requires newer version of Bitcoin Core") << "\n";
|
||||
strErrors << _("Error loading wallet.dat: Wallet requires newer version of LBRYcrd Core") << "\n";
|
||||
else if (nLoadWalletRet == DB_NEED_REWRITE)
|
||||
{
|
||||
strErrors << _("Wallet needed to be rewritten: restart Bitcoin Core to complete") << "\n";
|
||||
strErrors << _("Wallet needed to be rewritten: restart LBRYcrd Core to complete") << "\n";
|
||||
LogPrintf("%s", strErrors.str());
|
||||
return InitError(strErrors.str());
|
||||
}
|
||||
|
||||
+216
-29
@@ -14,6 +14,7 @@
|
||||
#include "consensus/validation.h"
|
||||
#include "init.h"
|
||||
#include "merkleblock.h"
|
||||
#include "ncc.h"
|
||||
#include "net.h"
|
||||
#include "pow.h"
|
||||
#include "txdb.h"
|
||||
@@ -22,6 +23,7 @@
|
||||
#include "undo.h"
|
||||
#include "util.h"
|
||||
#include "utilmoneystr.h"
|
||||
#include "ncc.h"
|
||||
#include "validationinterface.h"
|
||||
|
||||
#include <sstream>
|
||||
@@ -35,7 +37,7 @@
|
||||
using namespace std;
|
||||
|
||||
#if defined(NDEBUG)
|
||||
# error "Bitcoin cannot be compiled without assertions."
|
||||
# error "LBRYcrd cannot be compiled without assertions."
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -85,7 +87,7 @@ static void CheckBlockIndex();
|
||||
/** Constant stuff for coinbase transactions we create: */
|
||||
CScript COINBASE_FLAGS;
|
||||
|
||||
const string strMessageMagic = "Bitcoin Signed Message:\n";
|
||||
const string strMessageMagic = "LBRYcrd Signed Message:\n";
|
||||
|
||||
// Internal stuff
|
||||
namespace {
|
||||
@@ -515,6 +517,7 @@ CBlockIndex* FindForkInGlobalIndex(const CChain& chain, const CBlockLocator& loc
|
||||
}
|
||||
|
||||
CCoinsViewCache *pcoinsTip = NULL;
|
||||
CNCCTrie *pnccTrie = NULL;
|
||||
CBlockTreeDB *pblocktree = NULL;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
@@ -603,13 +606,9 @@ unsigned int LimitOrphanTxSize(unsigned int nMaxOrphans)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
bool IsStandardTx(const CTransaction& tx, string& reason)
|
||||
{
|
||||
// TODO: We may have a different version here
|
||||
if (tx.nVersion > CTransaction::CURRENT_VERSION || tx.nVersion < 1) {
|
||||
reason = "version";
|
||||
return false;
|
||||
@@ -647,7 +646,10 @@ bool IsStandardTx(const CTransaction& tx, string& reason)
|
||||
unsigned int nDataOut = 0;
|
||||
txnouttype whichType;
|
||||
BOOST_FOREACH(const CTxOut& txout, tx.vout) {
|
||||
if (!::IsStandard(txout.scriptPubKey, whichType)) {
|
||||
|
||||
const CScript& scriptPubKey = StripNCCScriptPrefix(txout.scriptPubKey);
|
||||
|
||||
if (!::IsStandard(scriptPubKey, whichType)) {
|
||||
reason = "scriptpubkey";
|
||||
return false;
|
||||
}
|
||||
@@ -711,7 +713,8 @@ bool AreInputsStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs)
|
||||
vector<vector<unsigned char> > vSolutions;
|
||||
txnouttype whichType;
|
||||
// get the scriptPubKey corresponding to this input:
|
||||
const CScript& prevScript = prev.scriptPubKey;
|
||||
const CScript& prevScript = StripNCCScriptPrefix(prev.scriptPubKey);
|
||||
|
||||
if (!Solver(prevScript, whichType, vSolutions))
|
||||
return false;
|
||||
int nArgsExpected = ScriptSigArgsExpected(whichType, vSolutions);
|
||||
@@ -781,8 +784,9 @@ unsigned int GetP2SHSigOpCount(const CTransaction& tx, const CCoinsViewCache& in
|
||||
for (unsigned int i = 0; i < tx.vin.size(); i++)
|
||||
{
|
||||
const CTxOut &prevout = inputs.GetOutputFor(tx.vin[i]);
|
||||
if (prevout.scriptPubKey.IsPayToScriptHash())
|
||||
nSigOps += prevout.scriptPubKey.GetSigOpCount(tx.vin[i].scriptSig);
|
||||
const CScript& scriptPubKey = StripNCCScriptPrefix(prevout.scriptPubKey);
|
||||
if (scriptPubKey.IsPayToScriptHash())
|
||||
nSigOps += scriptPubKey.GetSigOpCount(tx.vin[i].scriptSig);
|
||||
}
|
||||
return nSigOps;
|
||||
}
|
||||
@@ -1105,7 +1109,7 @@ bool GetTransaction(const uint256 &hash, CTransaction &txOut, uint256 &hashBlock
|
||||
if (coins)
|
||||
nHeight = coins->nHeight;
|
||||
}
|
||||
if (nHeight > 0)
|
||||
if (nHeight >= 0)
|
||||
pindexSlow = chainActive[nHeight];
|
||||
}
|
||||
}
|
||||
@@ -1215,8 +1219,8 @@ bool IsInitialBlockDownload()
|
||||
static bool lockIBDState = false;
|
||||
if (lockIBDState)
|
||||
return false;
|
||||
bool state = (chainActive.Height() < pindexBestHeader->nHeight - 24 * 6 ||
|
||||
pindexBestHeader->GetBlockTime() < GetTime() - 24 * 60 * 60);
|
||||
bool state = (chainActive.Height() < pindexBestHeader->nHeight - 24 * 6);// ||
|
||||
//pindexBestHeader->GetBlockTime() < GetTime() - 24 * 60 * 60);
|
||||
if (!state)
|
||||
lockIBDState = true;
|
||||
return state;
|
||||
@@ -1370,6 +1374,7 @@ void UpdateCoins(const CTransaction& tx, CValidationState &state, CCoinsViewCach
|
||||
coins->Spend(nPos);
|
||||
if (coins->vout.size() == 0) {
|
||||
CTxInUndo& undo = txundo.vprevout.back();
|
||||
undo.fLastUnspent = true;
|
||||
undo.nHeight = coins->nHeight;
|
||||
undo.fCoinBase = coins->fCoinBase;
|
||||
undo.nVersion = coins->nVersion;
|
||||
@@ -1592,13 +1597,13 @@ bool AbortNode(CValidationState& state, const std::string& strMessage, const std
|
||||
* @param out The out point that corresponds to the tx input.
|
||||
* @return True on success.
|
||||
*/
|
||||
static bool ApplyTxInUndo(const CTxInUndo& undo, CCoinsViewCache& view, const COutPoint& out)
|
||||
static bool ApplyTxInUndo(const CTxInUndo& undo, CCoinsViewCache& view, CNCCTrieCache& trieCache, const COutPoint& out)
|
||||
{
|
||||
bool fClean = true;
|
||||
|
||||
CCoinsModifier coins = view.ModifyCoins(out.hash);
|
||||
if (undo.nHeight != 0) {
|
||||
// undo data contains height: this is the last output of the prevout tx being spent
|
||||
if (undo.fLastUnspent) {
|
||||
// this is the last output of the prevout tx being spent
|
||||
if (!coins->IsPruned())
|
||||
fClean = fClean && error("%s: undo data overwriting existing transaction", __func__);
|
||||
coins->Clear();
|
||||
@@ -1613,14 +1618,32 @@ static bool ApplyTxInUndo(const CTxInUndo& undo, CCoinsViewCache& view, const CO
|
||||
fClean = fClean && error("%s: undo data overwriting existing output", __func__);
|
||||
if (coins->vout.size() < out.n+1)
|
||||
coins->vout.resize(out.n+1);
|
||||
|
||||
// restore NCC claim if applicable
|
||||
int op;
|
||||
std::vector<std::vector<unsigned char> > vvchParams;
|
||||
if (DecodeNCCScript(undo.txout.scriptPubKey, op, vvchParams))
|
||||
{
|
||||
assert(vvchParams.size() == 2);
|
||||
std::string name(vvchParams[0].begin(), vvchParams[0].end());
|
||||
LogPrintf("%s: Restoring %s to the NCC trie due to a block being disconnected\n", __func__, name.c_str());
|
||||
int nValidHeight = undo.nNCCValidHeight;
|
||||
if (nValidHeight > 0 && nValidHeight >= coins->nHeight)
|
||||
{
|
||||
if (!trieCache.undoSpendClaim(name, out.hash, out.n, undo.txout.nValue, coins->nHeight, nValidHeight))
|
||||
LogPrintf("%s: Something went wrong inserting the name\n", __func__);
|
||||
}
|
||||
}
|
||||
|
||||
coins->vout[out.n] = undo.txout;
|
||||
|
||||
return fClean;
|
||||
}
|
||||
|
||||
bool DisconnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, CCoinsViewCache& view, bool* pfClean)
|
||||
bool DisconnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, CCoinsViewCache& view, CNCCTrieCache& trieCache, bool* pfClean)
|
||||
{
|
||||
assert(pindex->GetBlockHash() == view.GetBestBlock());
|
||||
assert(pindex->GetBlockHash() == trieCache.getBestBlock());
|
||||
|
||||
if (pfClean)
|
||||
*pfClean = false;
|
||||
@@ -1637,6 +1660,8 @@ bool DisconnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex
|
||||
if (blockUndo.vtxundo.size() + 1 != block.vtx.size())
|
||||
return error("DisconnectBlock(): block and undo data inconsistent");
|
||||
|
||||
assert(trieCache.decrementBlock(blockUndo.insertUndo, blockUndo.expireUndo));
|
||||
|
||||
// undo transactions in reverse order
|
||||
for (int i = block.vtx.size() - 1; i >= 0; i--) {
|
||||
const CTransaction &tx = block.vtx[i];
|
||||
@@ -1657,6 +1682,23 @@ bool DisconnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex
|
||||
if (*outs != outsBlock)
|
||||
fClean = fClean && error("DisconnectBlock(): added transaction mismatch? database corrupted");
|
||||
|
||||
// remove any NCC claims
|
||||
for (unsigned int i = 0; i < tx.vout.size(); ++i)
|
||||
{
|
||||
const CTxOut& txout = tx.vout[i];
|
||||
|
||||
int op;
|
||||
std::vector<std::vector<unsigned char> > vvchParams;
|
||||
if (DecodeNCCScript(txout.scriptPubKey, op, vvchParams))
|
||||
{
|
||||
assert(vvchParams.size() == 2);
|
||||
std::string name(vvchParams[0].begin(), vvchParams[0].end());
|
||||
LogPrintf("%s: Removing %s from the ncc trie due to its block being disconnected\n", __func__, name.c_str());
|
||||
if (!trieCache.undoAddClaim(name, hash, i, pindex->nHeight))
|
||||
LogPrintf("%s: Something went wrong removing the name %s in hash %s\n", __func__, name.c_str(), hash.GetHex());
|
||||
}
|
||||
}
|
||||
|
||||
// remove outputs
|
||||
outs->Clear();
|
||||
}
|
||||
@@ -1669,7 +1711,7 @@ bool DisconnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex
|
||||
for (unsigned int j = tx.vin.size(); j-- > 0;) {
|
||||
const COutPoint &out = tx.vin[j].prevout;
|
||||
const CTxInUndo &undo = txundo.vprevout[j];
|
||||
if (!ApplyTxInUndo(undo, view, out))
|
||||
if (!ApplyTxInUndo(undo, view, trieCache, out))
|
||||
fClean = false;
|
||||
}
|
||||
}
|
||||
@@ -1677,6 +1719,8 @@ bool DisconnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex
|
||||
|
||||
// move best block pointer to prevout block
|
||||
view.SetBestBlock(pindex->pprev->GetBlockHash());
|
||||
trieCache.setBestBlock(pindex->pprev->GetBlockHash());
|
||||
assert(trieCache.getMerkleHash() == pindex->pprev->hashNCCTrie);
|
||||
|
||||
if (pfClean) {
|
||||
*pfClean = fClean;
|
||||
@@ -1782,7 +1826,7 @@ static int64_t nTimeIndex = 0;
|
||||
static int64_t nTimeCallbacks = 0;
|
||||
static int64_t nTimeTotal = 0;
|
||||
|
||||
bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pindex, CCoinsViewCache& view, bool fJustCheck)
|
||||
bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pindex, CCoinsViewCache& view, CNCCTrieCache& trieCache, bool fJustCheck)
|
||||
{
|
||||
const CChainParams& chainparams = Params();
|
||||
AssertLockHeld(cs_main);
|
||||
@@ -1794,12 +1838,18 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
|
||||
uint256 hashPrevBlock = pindex->pprev == NULL ? uint256() : pindex->pprev->GetBlockHash();
|
||||
assert(hashPrevBlock == view.GetBestBlock());
|
||||
|
||||
// also verify that the trie cache's current state corresponds to the previous block
|
||||
assert(hashPrevBlock == trieCache.getBestBlock());
|
||||
|
||||
// Special case for the genesis block, skipping connection of its transactions
|
||||
// (its coinbase is unspendable)
|
||||
if (block.GetHash() == chainparams.GetConsensus().hashGenesisBlock) {
|
||||
if (!fJustCheck)
|
||||
{
|
||||
view.SetBestBlock(pindex->GetBlockHash());
|
||||
return true;
|
||||
trieCache.setBestBlock(pindex->GetBlockHash());
|
||||
}
|
||||
//return true;
|
||||
}
|
||||
|
||||
bool fScriptChecks = true;
|
||||
@@ -1868,6 +1918,8 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
|
||||
return state.DoS(100, error("ConnectBlock(): too many sigops"),
|
||||
REJECT_INVALID, "bad-blk-sigops");
|
||||
|
||||
std::map<unsigned int, unsigned int> mNCCUndoHeights;
|
||||
|
||||
if (!tx.IsCoinBase())
|
||||
{
|
||||
if (!view.HaveInputs(tx))
|
||||
@@ -1891,17 +1943,106 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
|
||||
if (!CheckInputs(tx, state, view, fScriptChecks, flags, false, nScriptCheckThreads ? &vChecks : NULL))
|
||||
return false;
|
||||
control.Add(vChecks);
|
||||
|
||||
// To handle NCC updates, stick all NCC claims found in the inputs into a map of
|
||||
// name: (txhash, nOut). When running through the outputs, if any NCC claim's
|
||||
// name is found in the map, send the name's txhash and nOut to the trie cache,
|
||||
// and then remove the name: (txhash, nOut) mapping from the map.
|
||||
// If there are two or more NCC claims in the inputs with the same name, only
|
||||
// use the first.
|
||||
// TODO: before releasing, see if it's a better idea to make an explicit
|
||||
// operation for updating, like OP_UPDATE_NAME, which directly references
|
||||
// the claim to be updated. It would only be necessary to add a single extra
|
||||
// parameter to the operation, the input number, to exactly specify which
|
||||
// claim is being updated. Then here it would just need to be checked if that
|
||||
// input number was already used by an earlier tx.vout in the transaction.
|
||||
|
||||
typedef std::map<std::string, std::pair<uint256, unsigned int> > spentClaimsType;
|
||||
spentClaimsType spentClaims;
|
||||
|
||||
for (unsigned int i = 0; i < tx.vin.size(); ++i)
|
||||
{
|
||||
const CTxIn& txin = tx.vin[i];
|
||||
const CCoins* coins = view.AccessCoins(txin.prevout.hash);
|
||||
assert(coins);
|
||||
|
||||
int op;
|
||||
std::vector<std::vector<unsigned char> > vvchParams;
|
||||
if (DecodeNCCScript(coins->vout[txin.prevout.n].scriptPubKey, op, vvchParams))
|
||||
{
|
||||
assert(vvchParams.size() == 2);
|
||||
std::string name(vvchParams[0].begin(), vvchParams[0].end());
|
||||
int nValidAtHeight;
|
||||
LogPrintf("%s: Removing %s from the ncc trie. Tx: %s, nOut: %d\n", __func__, name, txin.prevout.hash.GetHex(), txin.prevout.n);
|
||||
if (trieCache.spendClaim(name, txin.prevout.hash, txin.prevout.n, coins->nHeight, nValidAtHeight))
|
||||
{
|
||||
mNCCUndoHeights[i] = nValidAtHeight;
|
||||
std::pair<uint256, unsigned int> val(txin.prevout.hash, txin.prevout.n);
|
||||
std::pair<std::string, std::pair<uint256, unsigned int> > entry(name, val);
|
||||
spentClaims.insert(entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (unsigned int i = 0; i < tx.vout.size(); ++i)
|
||||
{
|
||||
const CTxOut& txout = tx.vout[i];
|
||||
|
||||
int op;
|
||||
std::vector<std::vector<unsigned char> > vvchParams;
|
||||
if (DecodeNCCScript(txout.scriptPubKey, op, vvchParams))
|
||||
{
|
||||
assert(vvchParams.size() == 2);
|
||||
std::string name(vvchParams[0].begin(), vvchParams[0].end());
|
||||
LogPrintf("%s: Inserting %s into the ncc trie. Tx: %s, nOut: %d\n", __func__, name, tx.GetHash().GetHex(), i);
|
||||
spentClaimsType::iterator itSpent = spentClaims.find(name);
|
||||
bool success;
|
||||
if (itSpent != spentClaims.end())
|
||||
{
|
||||
LogPrintf("%s: Updating a previous transaction. Old tx: %s, old nOut: %d\n", __func__, itSpent->second.first.GetHex(), itSpent->second.second);
|
||||
success = trieCache.addClaim(name, tx.GetHash(), i, txout.nValue, pindex->nHeight, itSpent->second.first, itSpent->second.second);
|
||||
spentClaims.erase(itSpent);
|
||||
}
|
||||
else
|
||||
success = trieCache.addClaim(name, tx.GetHash(), i, txout.nValue, pindex->nHeight);
|
||||
if (!success)
|
||||
LogPrintf("%s: Something went wrong inserting the name\n", __func__);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CTxUndo undoDummy;
|
||||
if (i > 0) {
|
||||
if (i > 0)
|
||||
{
|
||||
blockundo.vtxundo.push_back(CTxUndo());
|
||||
}
|
||||
UpdateCoins(tx, state, view, i == 0 ? undoDummy : blockundo.vtxundo.back(), pindex->nHeight);
|
||||
if (i > 0 && !mNCCUndoHeights.empty())
|
||||
{
|
||||
std::vector<CTxInUndo>& txinUndos = blockundo.vtxundo.back().vprevout;
|
||||
for (std::map<unsigned int, unsigned int>::iterator itHeight = mNCCUndoHeights.begin(); itHeight != mNCCUndoHeights.end(); ++itHeight)
|
||||
{
|
||||
txinUndos[itHeight->first].nNCCValidHeight = itHeight->second;
|
||||
}
|
||||
}
|
||||
// The CTxUndo vector contains the heights at which NCC claims should be put into the trie.
|
||||
// This is necessary because some NCC claims are inserted immediately into the trie, and
|
||||
// others are inserted after a delay, depending on the state of the NCC trie at the time
|
||||
// that the claim was originally inserted into the blockchain. That state will not be
|
||||
// available when and if this block is disconnected.
|
||||
|
||||
vPos.push_back(std::make_pair(tx.GetHash(), pos));
|
||||
pos.nTxOffset += ::GetSerializeSize(tx, SER_DISK, CLIENT_VERSION);
|
||||
}
|
||||
|
||||
assert(trieCache.incrementBlock(blockundo.insertUndo, blockundo.expireUndo));
|
||||
|
||||
if (trieCache.getMerkleHash() != block.hashNCCTrie)
|
||||
return state.DoS(100,
|
||||
error("ConnectBlock() : the merkle root of the NCC trie does not match "
|
||||
"(actual=%s vs block=%s)", trieCache.getMerkleHash().GetHex(),
|
||||
block.hashNCCTrie.GetHex()), REJECT_INVALID, "bad-ncc-merkle-hash");
|
||||
|
||||
int64_t nTime1 = GetTimeMicros(); nTimeConnect += nTime1 - nTimeStart;
|
||||
LogPrint("bench", " - Connect %u transactions: %.2fms (%.3fms/tx, %.3fms/txin) [%.2fs]\n", (unsigned)block.vtx.size(), 0.001 * (nTime1 - nTimeStart), 0.001 * (nTime1 - nTimeStart) / block.vtx.size(), nInputs <= 1 ? 0 : 0.001 * (nTime1 - nTimeStart) / (nInputs-1), nTimeConnect * 0.000001);
|
||||
|
||||
@@ -1921,7 +2062,7 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
|
||||
return true;
|
||||
|
||||
// Write undo information to disk
|
||||
if (pindex->GetUndoPos().IsNull() || !pindex->IsValid(BLOCK_VALID_SCRIPTS))
|
||||
if (!(block.GetHash() == Params().GetConsensus().hashGenesisBlock) && (pindex->GetUndoPos().IsNull() || !pindex->IsValid(BLOCK_VALID_SCRIPTS)))
|
||||
{
|
||||
if (pindex->GetUndoPos().IsNull()) {
|
||||
CDiskBlockPos pos;
|
||||
@@ -1945,6 +2086,7 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
|
||||
|
||||
// add this block to the view's block chain
|
||||
view.SetBestBlock(pindex->GetBlockHash());
|
||||
trieCache.setBestBlock(pindex->GetBlockHash());
|
||||
|
||||
int64_t nTime3 = GetTimeMicros(); nTimeIndex += nTime3 - nTime2;
|
||||
LogPrint("bench", " - Index writing: %.2fms [%.2fs]\n", 0.001 * (nTime3 - nTime2), nTimeIndex * 0.000001);
|
||||
@@ -2054,6 +2196,8 @@ bool static FlushStateToDisk(CValidationState &state, FlushStateMode mode) {
|
||||
if (!CheckDiskSpace(128 * 2 * 2 * pcoinsTip->GetCacheSize()))
|
||||
return state.Error("out of disk space");
|
||||
// Flush the chainstate (which may refer to block index entries).
|
||||
if (!pnccTrie->WriteToDisk())
|
||||
return AbortNode("Failed to write to ncc trie database");
|
||||
if (!pcoinsTip->Flush())
|
||||
return AbortNode(state, "Failed to write to coin database");
|
||||
nLastFlush = nNow;
|
||||
@@ -2133,9 +2277,12 @@ bool static DisconnectTip(CValidationState &state) {
|
||||
int64_t nStart = GetTimeMicros();
|
||||
{
|
||||
CCoinsViewCache view(pcoinsTip);
|
||||
if (!DisconnectBlock(block, state, pindexDelete, view))
|
||||
CNCCTrieCache trieCache(pnccTrie);
|
||||
if (!DisconnectBlock(block, state, pindexDelete, view, trieCache))
|
||||
return error("DisconnectTip(): DisconnectBlock %s failed", pindexDelete->GetBlockHash().ToString());
|
||||
assert(view.Flush());
|
||||
assert(trieCache.flush());
|
||||
assert(pindexDelete->pprev->hashNCCTrie == trieCache.getMerkleHash());
|
||||
}
|
||||
LogPrint("bench", "- Disconnect block: %.2fms\n", (GetTimeMicros() - nStart) * 0.001);
|
||||
// Write the chain state to disk, if necessary.
|
||||
@@ -2188,8 +2335,9 @@ bool static ConnectTip(CValidationState &state, CBlockIndex *pindexNew, CBlock *
|
||||
LogPrint("bench", " - Load block from disk: %.2fms [%.2fs]\n", (nTime2 - nTime1) * 0.001, nTimeReadFromDisk * 0.000001);
|
||||
{
|
||||
CCoinsViewCache view(pcoinsTip);
|
||||
CNCCTrieCache trieCache(pnccTrie);
|
||||
CInv inv(MSG_BLOCK, pindexNew->GetBlockHash());
|
||||
bool rv = ConnectBlock(*pblock, state, pindexNew, view);
|
||||
bool rv = ConnectBlock(*pblock, state, pindexNew, view, trieCache);
|
||||
GetMainSignals().BlockChecked(*pblock, state);
|
||||
if (!rv) {
|
||||
if (state.IsInvalid())
|
||||
@@ -2200,6 +2348,7 @@ bool static ConnectTip(CValidationState &state, CBlockIndex *pindexNew, CBlock *
|
||||
nTime3 = GetTimeMicros(); nTimeConnectTotal += nTime3 - nTime2;
|
||||
LogPrint("bench", " - Connect total: %.2fms [%.2fs]\n", (nTime3 - nTime2) * 0.001, nTimeConnectTotal * 0.000001);
|
||||
assert(view.Flush());
|
||||
assert(trieCache.flush());
|
||||
}
|
||||
int64_t nTime4 = GetTimeMicros(); nTimeFlush += nTime4 - nTime3;
|
||||
LogPrint("bench", " - Flush: %.2fms [%.2fs]\n", (nTime4 - nTime3) * 0.001, nTimeFlush * 0.000001);
|
||||
@@ -2952,6 +3101,7 @@ bool TestBlockValidity(CValidationState &state, const CBlock& block, CBlockIndex
|
||||
return error("%s: CheckIndexAgainstCheckpoint(): %s", __func__, state.GetRejectReason().c_str());
|
||||
|
||||
CCoinsViewCache viewNew(pcoinsTip);
|
||||
CNCCTrieCache trieCache(pnccTrie);
|
||||
CBlockIndex indexDummy(block);
|
||||
indexDummy.pprev = pindexPrev;
|
||||
indexDummy.nHeight = pindexPrev->nHeight + 1;
|
||||
@@ -2963,7 +3113,7 @@ bool TestBlockValidity(CValidationState &state, const CBlock& block, CBlockIndex
|
||||
return false;
|
||||
if (!ContextualCheckBlock(block, state, pindexPrev))
|
||||
return false;
|
||||
if (!ConnectBlock(block, state, &indexDummy, viewNew, true))
|
||||
if (!ConnectBlock(block, state, &indexDummy, viewNew, trieCache, true))
|
||||
return false;
|
||||
assert(state.IsValid());
|
||||
|
||||
@@ -3276,6 +3426,7 @@ bool CVerifyDB::VerifyDB(CCoinsView *coinsview, int nCheckLevel, int nCheckDepth
|
||||
nCheckLevel = std::max(0, std::min(4, nCheckLevel));
|
||||
LogPrintf("Verifying last %i blocks at level %i\n", nCheckDepth, nCheckLevel);
|
||||
CCoinsViewCache coins(coinsview);
|
||||
CNCCTrieCache trieCache(pnccTrie);
|
||||
CBlockIndex* pindexState = chainActive.Tip();
|
||||
CBlockIndex* pindexFailure = NULL;
|
||||
int nGoodTransactions = 0;
|
||||
@@ -3305,7 +3456,7 @@ bool CVerifyDB::VerifyDB(CCoinsView *coinsview, int nCheckLevel, int nCheckDepth
|
||||
// check level 3: check for inconsistencies during memory-only disconnect of tip blocks
|
||||
if (nCheckLevel >= 3 && pindex == pindexState && (coins.DynamicMemoryUsage() + pcoinsTip->DynamicMemoryUsage()) <= nCoinCacheUsage) {
|
||||
bool fClean = true;
|
||||
if (!DisconnectBlock(block, state, pindex, coins, &fClean))
|
||||
if (!DisconnectBlock(block, state, pindex, coins, trieCache, &fClean))
|
||||
return error("VerifyDB(): *** irrecoverable inconsistency in block data at %d, hash=%s", pindex->nHeight, pindex->GetBlockHash().ToString());
|
||||
pindexState = pindex->pprev;
|
||||
if (!fClean) {
|
||||
@@ -3330,7 +3481,7 @@ bool CVerifyDB::VerifyDB(CCoinsView *coinsview, int nCheckLevel, int nCheckDepth
|
||||
CBlock block;
|
||||
if (!ReadBlockFromDisk(block, pindex))
|
||||
return error("VerifyDB(): *** ReadBlockFromDisk failed at %d, hash=%s", pindex->nHeight, pindex->GetBlockHash().ToString());
|
||||
if (!ConnectBlock(block, state, pindex, coins))
|
||||
if (!ConnectBlock(block, state, pindex, coins, trieCache))
|
||||
return error("VerifyDB(): *** found unconnectable block at %d, hash=%s", pindex->nHeight, pindex->GetBlockHash().ToString());
|
||||
}
|
||||
}
|
||||
@@ -3340,6 +3491,42 @@ bool CVerifyDB::VerifyDB(CCoinsView *coinsview, int nCheckLevel, int nCheckDepth
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GetProofForName(const CBlockIndex* pindexProof, const std::string& name, CNCCTrieProof& proof)
|
||||
{
|
||||
AssertLockHeld(cs_main);
|
||||
if (!chainActive.Contains(pindexProof))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
CCoinsViewCache coins(pcoinsTip);
|
||||
CNCCTrieCache trieCache(pnccTrie);
|
||||
CBlockIndex* pindexState = chainActive.Tip();
|
||||
CValidationState state;
|
||||
for (CBlockIndex *pindex = chainActive.Tip(); pindex && pindex->pprev && pindexState != pindexProof; pindex=pindex->pprev)
|
||||
{
|
||||
boost::this_thread::interruption_point();
|
||||
CBlock block;
|
||||
if (!ReadBlockFromDisk(block, pindex))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (pindex == pindexState && (coins.DynamicMemoryUsage() + pcoinsTip->DynamicMemoryUsage()) <= nCoinCacheUsage)
|
||||
{
|
||||
bool fClean = true;
|
||||
if (!DisconnectBlock(block, state, pindex, coins, trieCache, &fClean))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
pindexState = pindex->pprev;
|
||||
}
|
||||
if (ShutdownRequested())
|
||||
return false;
|
||||
}
|
||||
assert(pindexState == pindexProof);
|
||||
proof = trieCache.getProofForName(name);
|
||||
return true;
|
||||
}
|
||||
|
||||
void UnloadBlockIndex()
|
||||
{
|
||||
LOCK(cs_main);
|
||||
@@ -3477,7 +3664,7 @@ bool LoadExternalBlockFile(FILE* fileIn, CDiskBlockPos *dbp)
|
||||
}
|
||||
|
||||
// process in case the block isn't known yet
|
||||
if (mapBlockIndex.count(hash) == 0 || (mapBlockIndex[hash]->nStatus & BLOCK_HAVE_DATA) == 0) {
|
||||
if (hash != chainparams.GetConsensus().hashGenesisBlock && (mapBlockIndex.count(hash) == 0 || (mapBlockIndex[hash]->nStatus & BLOCK_HAVE_DATA) == 0)) {
|
||||
CValidationState state;
|
||||
if (ProcessNewBlock(state, NULL, &block, true, dbp))
|
||||
nLoaded++;
|
||||
|
||||
+9
-2
@@ -18,6 +18,7 @@
|
||||
#include "net.h"
|
||||
#include "primitives/block.h"
|
||||
#include "primitives/transaction.h"
|
||||
#include "ncctrie.h"
|
||||
#include "script/script.h"
|
||||
#include "script/sigcache.h"
|
||||
#include "script/standard.h"
|
||||
@@ -166,6 +167,8 @@ FILE* OpenBlockFile(const CDiskBlockPos &pos, bool fReadOnly = false);
|
||||
FILE* OpenUndoFile(const CDiskBlockPos &pos, bool fReadOnly = false);
|
||||
/** Translation to a filesystem path */
|
||||
boost::filesystem::path GetBlockPosFilename(const CDiskBlockPos &pos, const char *prefix);
|
||||
/** Get a cryptographic proof that a name maps to a value **/
|
||||
bool GetProofForName(const CBlockIndex* pindexProof, const std::string& name, CNCCTrieProof& proof);
|
||||
/** Import blocks from an external file */
|
||||
bool LoadExternalBlockFile(FILE* fileIn, CDiskBlockPos *dbp = NULL);
|
||||
/** Initialize a new block tree database + block data on disk */
|
||||
@@ -338,6 +341,7 @@ bool IsFinalTx(const CTransaction &tx, int nBlockHeight, int64_t nBlockTime);
|
||||
*/
|
||||
bool CheckFinalTx(const CTransaction &tx);
|
||||
|
||||
|
||||
/**
|
||||
* Closure representing one script verification
|
||||
* Note that this stores references to the spending transaction
|
||||
@@ -385,10 +389,10 @@ bool ReadBlockFromDisk(CBlock& block, const CBlockIndex* pindex);
|
||||
* In case pfClean is provided, operation will try to be tolerant about errors, and *pfClean
|
||||
* will be true if no problems were found. Otherwise, the return value will be false in case
|
||||
* of problems. Note that in any case, coins may be modified. */
|
||||
bool DisconnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, CCoinsViewCache& coins, bool* pfClean = NULL);
|
||||
bool DisconnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, CCoinsViewCache& coins, CNCCTrieCache& trieCache, bool* pfClean = NULL);
|
||||
|
||||
/** Apply the effects of this block (with given index) on the UTXO set represented by coins */
|
||||
bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pindex, CCoinsViewCache& coins, bool fJustCheck = false);
|
||||
bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pindex, CCoinsViewCache& coins, CNCCTrieCache& trieCache, bool fJustCheck = false);
|
||||
|
||||
/** Context-independent validity checks */
|
||||
bool CheckBlockHeader(const CBlockHeader& block, CValidationState& state, bool fCheckPOW = true);
|
||||
@@ -484,6 +488,9 @@ extern CChain chainActive;
|
||||
/** Global variable that points to the active CCoinsView (protected by cs_main) */
|
||||
extern CCoinsViewCache *pcoinsTip;
|
||||
|
||||
/** Global variable that points to the active CNCCTrie (protected by cs_main) */
|
||||
extern CNCCTrie *pnccTrie;
|
||||
|
||||
/** Global variable that points to the active block tree (protected by cs_main) */
|
||||
extern CBlockTreeDB *pblocktree;
|
||||
|
||||
|
||||
+68
-3
@@ -11,6 +11,8 @@
|
||||
#include "consensus/validation.h"
|
||||
#include "hash.h"
|
||||
#include "main.h"
|
||||
#include "ncc.h"
|
||||
#include "ncctrie.h"
|
||||
#include "net.h"
|
||||
#include "pow.h"
|
||||
#include "primitives/transaction.h"
|
||||
@@ -140,6 +142,11 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
|
||||
const int nHeight = pindexPrev->nHeight + 1;
|
||||
pblock->nTime = GetAdjustedTime();
|
||||
CCoinsViewCache view(pcoinsTip);
|
||||
if (!pnccTrie)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
CNCCTrieCache trieCache(pnccTrie);
|
||||
|
||||
// Priority order to process transactions
|
||||
list<COrphan> vOrphan; // list memory doesn't move
|
||||
@@ -283,7 +290,61 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
|
||||
if (!CheckInputs(tx, state, view, true, MANDATORY_SCRIPT_VERIFY_FLAGS, true))
|
||||
continue;
|
||||
|
||||
typedef std::map<std::string, std::pair<uint256, unsigned int> > spentClaimsType;
|
||||
spentClaimsType spentClaims;
|
||||
|
||||
BOOST_FOREACH(const CTxIn& txin, tx.vin)
|
||||
{
|
||||
const CCoins* coins = view.AccessCoins(txin.prevout.hash);
|
||||
// This seems to happen during testing, and should never happen otherwise
|
||||
if (!coins || txin.prevout.n >= coins->vout.size())
|
||||
{
|
||||
LogPrintf("%s: !coins || txin.prevout.n >= coins->vout.size(). txin.prevout.hash = %s\n", __func__, txin.prevout.hash.GetHex());
|
||||
if (coins)
|
||||
LogPrintf("coins is not null. txin.prevout.n = %d, coins->vout.size() = %d\n", txin.prevout.n, coins->vout.size());
|
||||
continue;
|
||||
}
|
||||
|
||||
std::vector<std::vector<unsigned char> > vvchParams;
|
||||
int op;
|
||||
|
||||
if (DecodeNCCScript(coins->vout[txin.prevout.n].scriptPubKey, op, vvchParams))
|
||||
{
|
||||
assert(vvchParams.size() == 2);
|
||||
std::string name(vvchParams[0].begin(), vvchParams[0].end());
|
||||
int throwaway;
|
||||
trieCache.spendClaim(name, txin.prevout.hash, txin.prevout.n, coins->nHeight, throwaway);
|
||||
std::pair<uint256, unsigned int> val(txin.prevout.hash, txin.prevout.n);
|
||||
std::pair<std::string, std::pair<uint256, unsigned int> >entry(name, val);
|
||||
spentClaims.insert(entry);
|
||||
}
|
||||
}
|
||||
|
||||
UpdateCoins(tx, state, view, nHeight);
|
||||
|
||||
for (unsigned int i = 0; i < tx.vout.size(); ++i)
|
||||
{
|
||||
const CTxOut& txout = tx.vout[i];
|
||||
|
||||
std::vector<std::vector<unsigned char> > vvchParams;
|
||||
int op;
|
||||
if (DecodeNCCScript(txout.scriptPubKey, op, vvchParams))
|
||||
{
|
||||
assert(vvchParams.size() == 2);
|
||||
std::string name(vvchParams[0].begin(), vvchParams[0].end());
|
||||
spentClaimsType::iterator itSpent = spentClaims.find(name);
|
||||
bool success;
|
||||
if (itSpent != spentClaims.end())
|
||||
{
|
||||
success = trieCache.addClaim(name, tx.GetHash(), i, txout.nValue, nHeight, itSpent->second.first, itSpent->second.second);
|
||||
spentClaims.erase(itSpent);
|
||||
}
|
||||
else
|
||||
success = trieCache.addClaim(name, tx.GetHash(), i, txout.nValue, nHeight);
|
||||
if (!success)
|
||||
LogPrintf("%s: Something went wrong inserting the name\n", __func__);
|
||||
}
|
||||
}
|
||||
|
||||
// Added
|
||||
pblock->vtx.push_back(tx);
|
||||
@@ -334,6 +395,10 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
|
||||
pblock->nBits = GetNextWorkRequired(pindexPrev, pblock, Params().GetConsensus());
|
||||
pblock->nNonce = 0;
|
||||
pblocktemplate->vTxSigOps[0] = GetLegacySigOpCount(pblock->vtx[0]);
|
||||
CNCCTrieQueueUndo dummyInsertUndo;
|
||||
CNCCTrieQueueUndo dummyExpireUndo;
|
||||
trieCache.incrementBlock(dummyInsertUndo, dummyExpireUndo);
|
||||
pblock->hashNCCTrie = trieCache.getMerkleHash();
|
||||
|
||||
CValidationState state;
|
||||
if (!TestBlockValidity(state, *pblock, pindexPrev, false, false))
|
||||
@@ -376,12 +441,12 @@ void IncrementExtraNonce(CBlock* pblock, CBlockIndex* pindexPrev, unsigned int&
|
||||
//
|
||||
bool static ScanHash(const CBlockHeader *pblock, uint32_t& nNonce, uint256 *phash)
|
||||
{
|
||||
// Write the first 76 bytes of the block header to a double-SHA256 state.
|
||||
// Write the first 108 bytes of the block header to a double-SHA256 state.
|
||||
CHash256 hasher;
|
||||
CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
|
||||
ss << *pblock;
|
||||
assert(ss.size() == 80);
|
||||
hasher.Write((unsigned char*)&ss[0], 76);
|
||||
assert(ss.size() == 112);
|
||||
hasher.Write((unsigned char*)&ss[0], 108);
|
||||
|
||||
while (true) {
|
||||
nNonce++;
|
||||
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
#include "ncc.h"
|
||||
#include "util.h"
|
||||
|
||||
bool DecodeNCCScript(const CScript& scriptIn, int& op, std::vector<std::vector<unsigned char> >& vvchParams)
|
||||
{
|
||||
CScript::const_iterator pc = scriptIn.begin();
|
||||
return DecodeNCCScript(scriptIn, op, vvchParams, pc);
|
||||
}
|
||||
|
||||
bool DecodeNCCScript(const CScript& scriptIn, int& op, std::vector<std::vector<unsigned char> >& vvchParams, CScript::const_iterator& pc)
|
||||
{
|
||||
opcodetype opcode;
|
||||
if (!scriptIn.GetOp(pc, opcode))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (opcode != OP_CLAIM_NAME)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
op = opcode;
|
||||
|
||||
std::vector<unsigned char> vchName;
|
||||
std::vector<unsigned char> vchValue;
|
||||
|
||||
// The correct format is:
|
||||
// OP_CLAIM_NAME vchName vchValue OP_DROP2 OP_DROP pubkeyscript
|
||||
// All others are invalid.
|
||||
|
||||
if (!scriptIn.GetOp(pc, opcode, vchName) || opcode < 0 || opcode > OP_PUSHDATA4)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!scriptIn.GetOp(pc, opcode, vchValue) || opcode < 0 || opcode > OP_PUSHDATA4)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!scriptIn.GetOp(pc, opcode) || opcode != OP_2DROP)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!scriptIn.GetOp(pc, opcode) || opcode != OP_DROP)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
vvchParams.push_back(vchName);
|
||||
vvchParams.push_back(vchValue);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
CScript StripNCCScriptPrefix(const CScript& scriptIn)
|
||||
{
|
||||
int op;
|
||||
std::vector<std::vector<unsigned char> > vvchParams;
|
||||
CScript::const_iterator pc = scriptIn.begin();
|
||||
|
||||
if (!DecodeNCCScript(scriptIn, op, vvchParams, pc))
|
||||
{
|
||||
return scriptIn;
|
||||
}
|
||||
|
||||
return CScript(pc, scriptIn.end());
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
#ifndef BITCOIN_NCC_H
|
||||
#define BITCOIN_NCC_H
|
||||
|
||||
#include "script/script.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
bool DecodeNCCScript(const CScript& scriptIn, int& op, std::vector<std::vector<unsigned char> >& vvchParams);
|
||||
bool DecodeNCCScript(const CScript& scriptIn, int& op, std::vector<std::vector<unsigned char> >& vvchParams, CScript::const_iterator& pc);
|
||||
CScript StripNCCScriptPrefix(const CScript& scriptIn);
|
||||
|
||||
#endif // BITCOIN_NCC_H
|
||||
+1343
File diff suppressed because it is too large.
Load diff
+270
@@ -0,0 +1,270 @@
|
||||
#ifndef BITCOIN_NCCTRIE_H
|
||||
#define BITCOIN_NCCTRIE_H
|
||||
|
||||
#include "amount.h"
|
||||
#include "serialize.h"
|
||||
#include "coins.h"
|
||||
#include "hash.h"
|
||||
#include "uint256.h"
|
||||
#include "util.h"
|
||||
#include "leveldbwrapper.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
#define DEFAULT_DELAY 100
|
||||
|
||||
uint256 getOutPointHash(uint256 txhash, uint32_t nOut);
|
||||
|
||||
class CNodeValue
|
||||
{
|
||||
public:
|
||||
uint256 txhash;
|
||||
uint32_t nOut;
|
||||
CAmount nAmount;
|
||||
int nHeight;
|
||||
int nValidAtHeight;
|
||||
CNodeValue() {};
|
||||
CNodeValue(uint256 txhash, uint32_t nOut, CAmount nAmount, int nHeight, int nValidAtHeight) : txhash(txhash), nOut(nOut), nAmount(nAmount), nHeight(nHeight), nValidAtHeight(nValidAtHeight) {}
|
||||
uint256 GetHash() const;
|
||||
ADD_SERIALIZE_METHODS;
|
||||
|
||||
template <typename Stream, typename Operation>
|
||||
inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
|
||||
READWRITE(txhash);
|
||||
READWRITE(nOut);
|
||||
READWRITE(nAmount);
|
||||
READWRITE(nHeight);
|
||||
READWRITE(nValidAtHeight);
|
||||
}
|
||||
|
||||
bool operator<(const CNodeValue& other) const
|
||||
{
|
||||
if (nAmount < other.nAmount)
|
||||
return true;
|
||||
else if (nAmount == other.nAmount)
|
||||
{
|
||||
if (nHeight > other.nHeight)
|
||||
return true;
|
||||
else if (nHeight == other.nHeight)
|
||||
{
|
||||
if (txhash.GetHex() > other.txhash.GetHex())
|
||||
return true;
|
||||
else if (txhash == other.txhash)
|
||||
if (nOut > other.nOut)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
bool operator==(const CNodeValue& other) const
|
||||
{
|
||||
return txhash == other.txhash && nOut == other.nOut && nAmount == other.nAmount && nHeight == other.nHeight && nValidAtHeight == other.nValidAtHeight;
|
||||
}
|
||||
bool operator!=(const CNodeValue& other) const
|
||||
{
|
||||
return !(*this == other);
|
||||
}
|
||||
};
|
||||
|
||||
class CNCCTrieNode;
|
||||
class CNCCTrie;
|
||||
|
||||
typedef std::map<unsigned char, CNCCTrieNode*> nodeMapType;
|
||||
|
||||
typedef std::pair<std::string, CNCCTrieNode> namedNodeType;
|
||||
|
||||
class CNCCTrieNode
|
||||
{
|
||||
public:
|
||||
CNCCTrieNode() {}
|
||||
CNCCTrieNode(uint256 hash) : hash(hash) {}
|
||||
uint256 hash;
|
||||
uint256 bestBlock;
|
||||
nodeMapType children;
|
||||
std::vector<CNodeValue> values;
|
||||
bool insertValue(CNodeValue val, bool * fChanged = NULL);
|
||||
bool removeValue(uint256& txhash, uint32_t nOut, CNodeValue& val, bool * fChanged = NULL);
|
||||
bool getBestValue(CNodeValue& val) const;
|
||||
bool empty() const {return children.empty() && values.empty();}
|
||||
bool haveValue(const uint256& txhash, uint32_t nOut) const;
|
||||
ADD_SERIALIZE_METHODS;
|
||||
|
||||
template <typename Stream, typename Operation>
|
||||
inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
|
||||
READWRITE(hash);
|
||||
READWRITE(values);
|
||||
}
|
||||
|
||||
bool operator==(const CNCCTrieNode& other) const
|
||||
{
|
||||
return hash == other.hash && values == other.values;
|
||||
}
|
||||
|
||||
bool operator!=(const CNCCTrieNode& other) const
|
||||
{
|
||||
return !(*this == other);
|
||||
}
|
||||
private:
|
||||
bool getValue(uint256& txhash, uint32_t nOut, CNodeValue& val) const;
|
||||
};
|
||||
|
||||
struct nodenamecompare
|
||||
{
|
||||
bool operator() (const std::string& i, const std::string& j) const
|
||||
{
|
||||
if (i.size() == j.size())
|
||||
return i < j;
|
||||
return i.size() < j.size();
|
||||
}
|
||||
};
|
||||
|
||||
class CValueQueueEntry
|
||||
{
|
||||
public:
|
||||
CValueQueueEntry() {}
|
||||
CValueQueueEntry(std::string name, CNodeValue val) : name(name), val(val) {}
|
||||
std::string name;
|
||||
CNodeValue val;
|
||||
|
||||
ADD_SERIALIZE_METHODS;
|
||||
|
||||
template <typename Stream, typename Operation>
|
||||
inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
|
||||
READWRITE(name);
|
||||
READWRITE(val);
|
||||
}
|
||||
};
|
||||
|
||||
typedef std::map<int, std::vector<CValueQueueEntry> > valueQueueType;
|
||||
typedef std::vector<CValueQueueEntry> CNCCTrieQueueUndo;
|
||||
|
||||
typedef std::map<std::string, CNCCTrieNode*, nodenamecompare> nodeCacheType;
|
||||
|
||||
typedef std::map<std::string, uint256> hashMapType;
|
||||
|
||||
class CNCCTrieCache;
|
||||
|
||||
class CNCCTrie
|
||||
{
|
||||
public:
|
||||
CNCCTrie(bool fMemory = false, bool fWipe = false) : db(GetDataDir() / "ncctrie", 100, fMemory, fWipe), nCurrentHeight(0), nExpirationTime(262974), root(uint256S("0000000000000000000000000000000000000000000000000000000000000001")) {}
|
||||
uint256 getMerkleHash();
|
||||
CLevelDBWrapper db;
|
||||
bool empty() const;
|
||||
void clear();
|
||||
bool checkConsistency();
|
||||
bool WriteToDisk();
|
||||
bool ReadFromDisk(bool check = false);
|
||||
std::vector<namedNodeType> flattenTrie() const;
|
||||
bool getInfoForName(const std::string& name, CNodeValue& val) const;
|
||||
int nCurrentHeight;
|
||||
bool queueEmpty() const;
|
||||
bool expirationQueueEmpty() const;
|
||||
void setExpirationTime(int t);
|
||||
bool getQueueRow(int nHeight, std::vector<CValueQueueEntry>& row) const;
|
||||
bool getExpirationQueueRow(int nHeight, std::vector<CValueQueueEntry>& row);
|
||||
bool haveClaim(const std::string& name, const uint256& txhash, uint32_t nOut) const;
|
||||
bool haveClaimInQueue(const std::string& name, const uint256& txhash, uint32_t nOut, int nHeight, int& nValidAtHeight) const;
|
||||
bool haveClaimInQueueRow(const std::string& name, const uint256& txhash, uint32_t nOut, int nHeight, const std::vector<CValueQueueEntry>& row) const;
|
||||
unsigned int getTotalNamesInTrie() const;
|
||||
unsigned int getTotalClaimsInTrie() const;
|
||||
CAmount getTotalValueOfClaimsInTrie(bool fControllingOnly) const;
|
||||
friend class CNCCTrieCache;
|
||||
int nExpirationTime;
|
||||
private:
|
||||
void clear(CNCCTrieNode* current);
|
||||
bool update(nodeCacheType& cache, hashMapType& hashes, const uint256& hashBlock, valueQueueType& queueCache, valueQueueType& expirationQueueCache, int nNewHeight);
|
||||
bool updateName(const std::string& name, CNCCTrieNode* updatedNode);
|
||||
bool updateHash(const std::string& name, uint256& hash);
|
||||
bool recursiveNullify(CNCCTrieNode* node, std::string& name);
|
||||
bool recursiveCheckConsistency(CNCCTrieNode* node);
|
||||
bool InsertFromDisk(const std::string& name, CNCCTrieNode* node);
|
||||
unsigned int getTotalNamesRecursive(const CNCCTrieNode* current) const;
|
||||
unsigned int getTotalClaimsRecursive(const CNCCTrieNode* current) const;
|
||||
CAmount getTotalValueOfClaimsRecursive(const CNCCTrieNode* current, bool fControllingOnly) const;
|
||||
bool recursiveFlattenTrie(const std::string& name, const CNCCTrieNode* current, std::vector<namedNodeType>& nodes) const;
|
||||
CNCCTrieNode root;
|
||||
uint256 hashBlock;
|
||||
valueQueueType dirtyQueueRows;
|
||||
valueQueueType dirtyExpirationQueueRows;
|
||||
|
||||
nodeCacheType dirtyNodes;
|
||||
void markNodeDirty(const std::string& name, CNCCTrieNode* node);
|
||||
void updateQueueRow(int nHeight, std::vector<CValueQueueEntry>& row);
|
||||
void updateExpirationRow(int nHeight, std::vector<CValueQueueEntry>& row);
|
||||
void BatchWriteNode(CLevelDBBatch& batch, const std::string& name, const CNCCTrieNode* pNode) const;
|
||||
void BatchEraseNode(CLevelDBBatch& batch, const std::string& nome) const;
|
||||
void BatchWriteQueueRows(CLevelDBBatch& batch);
|
||||
void BatchWriteExpirationQueueRows(CLevelDBBatch& batch);
|
||||
};
|
||||
|
||||
class CNCCTrieProofNode
|
||||
{
|
||||
public:
|
||||
CNCCTrieProofNode() {};
|
||||
CNCCTrieProofNode(std::vector<std::pair<unsigned char, uint256> > children, bool hasValue, uint256 valHash) : children(children), hasValue(hasValue), valHash(valHash) {};
|
||||
std::vector<std::pair<unsigned char, uint256> > children;
|
||||
bool hasValue;
|
||||
uint256 valHash;
|
||||
};
|
||||
|
||||
class CNCCTrieProof
|
||||
{
|
||||
public:
|
||||
CNCCTrieProof() {};
|
||||
CNCCTrieProof(std::vector<CNCCTrieProofNode> nodes, bool hasValue, uint256 txhash, uint32_t nOut) : nodes(nodes), hasValue(hasValue), txhash(txhash), nOut(nOut) {}
|
||||
std::vector<CNCCTrieProofNode> nodes;
|
||||
bool hasValue;
|
||||
uint256 txhash;
|
||||
uint32_t nOut;
|
||||
};
|
||||
|
||||
class CNCCTrieCache
|
||||
{
|
||||
public:
|
||||
CNCCTrieCache(CNCCTrie* base): base(base) {assert(base); nCurrentHeight = base->nCurrentHeight;}
|
||||
uint256 getMerkleHash() const;
|
||||
bool empty() const;
|
||||
bool flush();
|
||||
bool dirty() const { return !dirtyHashes.empty(); }
|
||||
bool addClaim(const std::string name, uint256 txhash, uint32_t nOut, CAmount nAmount, int nHeight) const;
|
||||
bool addClaim(const std::string name, uint256 txhash, uint32_t nOut, CAmount nAmount, int nHeight, uint256 prevTxhash, uint32_t nPrevOut) const;
|
||||
bool undoAddClaim(const std::string name, uint256 txhash, uint32_t nOut, int nHeight) const;
|
||||
bool spendClaim(const std::string name, uint256 txhash, uint32_t nOut, int nHeight, int& nValidAtHeight) const;
|
||||
bool undoSpendClaim(const std::string name, uint256 txhash, uint32_t nOut, CAmount nAmount, int nHeight, int nValidAtHeight) const;
|
||||
uint256 getBestBlock();
|
||||
void setBestBlock(const uint256& hashBlock);
|
||||
bool incrementBlock(CNCCTrieQueueUndo& insertUndo, CNCCTrieQueueUndo& expireUndo) const;
|
||||
bool decrementBlock(CNCCTrieQueueUndo& insertUndo, CNCCTrieQueueUndo& expireUndo) const;
|
||||
~CNCCTrieCache() { clear(); }
|
||||
bool insertClaimIntoTrie(const std::string name, CNodeValue val) const;
|
||||
bool removeClaimFromTrie(const std::string name, uint256 txhash, uint32_t nOut, int& nValidAtHeight) const;
|
||||
CNCCTrieProof getProofForName(const std::string& name) const;
|
||||
private:
|
||||
CNCCTrie* base;
|
||||
mutable nodeCacheType cache;
|
||||
mutable std::set<std::string> dirtyHashes;
|
||||
mutable hashMapType cacheHashes;
|
||||
mutable valueQueueType valueQueueCache;
|
||||
mutable valueQueueType expirationQueueCache;
|
||||
mutable int nCurrentHeight; // Height of the block that is being worked on, which is
|
||||
// one greater than the height of the chain's tip
|
||||
uint256 computeHash() const;
|
||||
bool recursiveComputeMerkleHash(CNCCTrieNode* tnCurrent, std::string sPos) const;
|
||||
bool recursivePruneName(CNCCTrieNode* tnCurrent, unsigned int nPos, std::string sName, bool* pfNullified = NULL) const;
|
||||
bool clear() const;
|
||||
bool removeClaim(const std::string name, uint256 txhash, uint32_t nOut, int nHeight, int& nValidAtHeight) const;
|
||||
bool addClaimToQueues(const std::string name, uint256 txhash, uint32_t nOut, CAmount nAmount, int nHeight, int nValidAtHeight) const;
|
||||
bool removeClaimFromQueue(const std::string name, uint256 txhash, uint32_t nOut, int nHeightToCheck, int& nValidAtHeight) const;
|
||||
void addToExpirationQueue(CValueQueueEntry& entry) const;
|
||||
void removeFromExpirationQueue(const std::string name, uint256 txhash, uint32_t nOut, int nHeight) const;
|
||||
valueQueueType::iterator getQueueCacheRow(int nHeight, bool createIfNotExists) const;
|
||||
valueQueueType::iterator getExpirationQueueCacheRow(int nHeight, bool createIfNotExists) const;
|
||||
uint256 getLeafHashForProof(const std::string& currentPosition, unsigned char nodeChar, const CNCCTrieNode* currentNode) const;
|
||||
uint256 hashBlock;
|
||||
};
|
||||
|
||||
#endif // BITCOIN_NCCTRIE_H
|
||||
+2
-2
@@ -1025,7 +1025,7 @@ void ThreadMapPort()
|
||||
}
|
||||
}
|
||||
|
||||
string strDesc = "Bitcoin " + FormatFullVersion();
|
||||
string strDesc = "LBRYcrd " + FormatFullVersion();
|
||||
|
||||
try {
|
||||
while (true) {
|
||||
@@ -1513,7 +1513,7 @@ bool BindListenPort(const CService &addrBind, string& strError, bool fWhiteliste
|
||||
{
|
||||
int nErr = WSAGetLastError();
|
||||
if (nErr == WSAEADDRINUSE)
|
||||
strError = strprintf(_("Unable to bind to %s on this computer. Bitcoin Core is probably already running."), addrBind.ToString());
|
||||
strError = strprintf(_("Unable to bind to %s on this computer. LBRYcrd Core is probably already running."), addrBind.ToString());
|
||||
else
|
||||
strError = strprintf(_("Unable to bind to %s on this computer (bind returned error %s)"), addrBind.ToString(), NetworkErrorString(nErr));
|
||||
LogPrintf("%s\n", strError);
|
||||
|
||||
@@ -112,11 +112,12 @@ uint256 CBlock::CheckMerkleBranch(uint256 hash, const std::vector<uint256>& vMer
|
||||
std::string CBlock::ToString() const
|
||||
{
|
||||
std::stringstream s;
|
||||
s << strprintf("CBlock(hash=%s, ver=%d, hashPrevBlock=%s, hashMerkleRoot=%s, nTime=%u, nBits=%08x, nNonce=%u, vtx=%u)\n",
|
||||
s << strprintf("CBlock(hash=%s, ver=%d, hashPrevBlock=%s, hashMerkleRoot=%s, hashNCCTrie=%s, nTime=%u, nBits=%08x, nNonce=%u, vtx=%u)\n",
|
||||
GetHash().ToString(),
|
||||
nVersion,
|
||||
hashPrevBlock.ToString(),
|
||||
hashMerkleRoot.ToString(),
|
||||
hashNCCTrie.ToString(),
|
||||
nTime, nBits, nNonce,
|
||||
vtx.size());
|
||||
for (unsigned int i = 0; i < vtx.size(); i++)
|
||||
|
||||
@@ -25,6 +25,7 @@ public:
|
||||
int32_t nVersion;
|
||||
uint256 hashPrevBlock;
|
||||
uint256 hashMerkleRoot;
|
||||
uint256 hashNCCTrie;
|
||||
uint32_t nTime;
|
||||
uint32_t nBits;
|
||||
uint32_t nNonce;
|
||||
@@ -42,6 +43,7 @@ public:
|
||||
nVersion = this->nVersion;
|
||||
READWRITE(hashPrevBlock);
|
||||
READWRITE(hashMerkleRoot);
|
||||
READWRITE(hashNCCTrie);
|
||||
READWRITE(nTime);
|
||||
READWRITE(nBits);
|
||||
READWRITE(nNonce);
|
||||
@@ -52,6 +54,7 @@ public:
|
||||
nVersion = CBlockHeader::CURRENT_VERSION;
|
||||
hashPrevBlock.SetNull();
|
||||
hashMerkleRoot.SetNull();
|
||||
hashNCCTrie.SetNull();
|
||||
nTime = 0;
|
||||
nBits = 0;
|
||||
nNonce = 0;
|
||||
@@ -112,6 +115,7 @@ public:
|
||||
block.nVersion = nVersion;
|
||||
block.hashPrevBlock = hashPrevBlock;
|
||||
block.hashMerkleRoot = hashMerkleRoot;
|
||||
block.hashNCCTrie = hashNCCTrie;
|
||||
block.nTime = nTime;
|
||||
block.nBits = nBits;
|
||||
block.nNonce = nNonce;
|
||||
|
||||
@@ -151,7 +151,8 @@ public:
|
||||
|
||||
bool IsDust(const CFeeRate &minRelayTxFee) const
|
||||
{
|
||||
return (nValue < GetDustThreshold(minRelayTxFee));
|
||||
return false;
|
||||
// return (nValue < GetDustThreshold(minRelayTxFee));
|
||||
}
|
||||
|
||||
friend bool operator==(const CTxOut& a, const CTxOut& b)
|
||||
|
||||
@@ -17,6 +17,7 @@ static const struct {
|
||||
const char *titleAddText;
|
||||
} network_styles[] = {
|
||||
{"main", QAPP_APP_NAME_DEFAULT, 0, 0, ""},
|
||||
{"lbrycrd", QAPP_APP_NAME_DEFAULT, 0, 0, ""},
|
||||
{"test", QAPP_APP_NAME_TESTNET, 70, 30, QT_TRANSLATE_NOOP("SplashScreen", "[testnet]")},
|
||||
{"regtest", QAPP_APP_NAME_TESTNET, 160, 30, "[regtest]"}
|
||||
};
|
||||
|
||||
+11
-4
@@ -65,6 +65,7 @@ UniValue blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool tx
|
||||
result.push_back(Pair("height", blockindex->nHeight));
|
||||
result.push_back(Pair("version", block.nVersion));
|
||||
result.push_back(Pair("merkleroot", block.hashMerkleRoot.GetHex()));
|
||||
result.push_back(Pair("nccroot", block.hashNCCTrie.GetHex()));
|
||||
UniValue txs(UniValue::VARR);
|
||||
BOOST_FOREACH(const CTransaction&tx, block.vtx)
|
||||
{
|
||||
@@ -82,6 +83,11 @@ UniValue blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool tx
|
||||
result.push_back(Pair("nonce", (uint64_t)block.nNonce));
|
||||
result.push_back(Pair("bits", strprintf("%08x", block.nBits)));
|
||||
result.push_back(Pair("difficulty", GetDifficulty(blockindex)));
|
||||
bool fNegative;
|
||||
bool fOverflow;
|
||||
arith_uint256 target;
|
||||
target.SetCompact(block.nBits, &fNegative, &fOverflow);
|
||||
result.push_back(Pair("target", target.ToString()));
|
||||
result.push_back(Pair("chainwork", blockindex->nChainWork.GetHex()));
|
||||
|
||||
if (blockindex->pprev)
|
||||
@@ -162,7 +168,7 @@ UniValue getrawmempool(const UniValue& params, bool fHelp)
|
||||
"{ (json object)\n"
|
||||
" \"transactionid\" : { (json object)\n"
|
||||
" \"size\" : n, (numeric) transaction size in bytes\n"
|
||||
" \"fee\" : n, (numeric) transaction fee in bitcoins\n"
|
||||
" \"fee\" : n, (numeric) transaction fee in LBC\n"
|
||||
" \"time\" : n, (numeric) local time transaction entered pool in seconds since 1 Jan 1970 GMT\n"
|
||||
" \"height\" : n, (numeric) block height when transaction entered pool\n"
|
||||
" \"startingpriority\" : n, (numeric) priority when transaction entered pool\n"
|
||||
@@ -273,6 +279,7 @@ UniValue getblock(const UniValue& params, bool fHelp)
|
||||
" \"height\" : n, (numeric) The block height or index\n"
|
||||
" \"version\" : n, (numeric) The block version\n"
|
||||
" \"merkleroot\" : \"xxxx\", (string) The merkle root\n"
|
||||
" \"nccroot\" : \"xxxx\", (string) The hash of the root of the NCC trie\n"
|
||||
" \"tx\" : [ (array of string) The transaction ids\n"
|
||||
" \"transactionid\" (string) The transaction id\n"
|
||||
" ,...\n"
|
||||
@@ -377,14 +384,14 @@ UniValue gettxout(const UniValue& params, bool fHelp)
|
||||
"{\n"
|
||||
" \"bestblock\" : \"hash\", (string) the block hash\n"
|
||||
" \"confirmations\" : n, (numeric) The number of confirmations\n"
|
||||
" \"value\" : x.xxx, (numeric) The transaction value in btc\n"
|
||||
" \"value\" : x.xxx, (numeric) The transaction value in LBC\n"
|
||||
" \"scriptPubKey\" : { (json object)\n"
|
||||
" \"asm\" : \"code\", (string) \n"
|
||||
" \"hex\" : \"hex\", (string) \n"
|
||||
" \"reqSigs\" : n, (numeric) Number of required signatures\n"
|
||||
" \"type\" : \"pubkeyhash\", (string) The type, eg pubkeyhash\n"
|
||||
" \"addresses\" : [ (array of string) array of bitcoin addresses\n"
|
||||
" \"bitcoinaddress\" (string) bitcoin address\n"
|
||||
" \"addresses\" : [ (array of string) array of lbrycrd addresses\n"
|
||||
" \"lbrycrdaddress\" (string) lbrycrd address\n"
|
||||
" ,...\n"
|
||||
" ]\n"
|
||||
" },\n"
|
||||
|
||||
@@ -93,6 +93,12 @@ static const CRPCConvertParam vRPCConvertParams[] =
|
||||
{ "estimatepriority", 0 },
|
||||
{ "prioritisetransaction", 1 },
|
||||
{ "prioritisetransaction", 2 },
|
||||
{ "claimname", 2},
|
||||
{ "updatename", 2},
|
||||
{ "abandonname", 2},
|
||||
{ "listnameclaims", 0},
|
||||
{ "listnameclaims", 1},
|
||||
{ "gettotalvalueofclaims", 0},
|
||||
};
|
||||
|
||||
class CRPCConvertTable
|
||||
|
||||
+4
-4
@@ -99,7 +99,7 @@ UniValue getgenerate(const UniValue& params, bool fHelp)
|
||||
throw runtime_error(
|
||||
"getgenerate\n"
|
||||
"\nReturn if the server is set to generate coins or not. The default is false.\n"
|
||||
"It is set with the command line argument -gen (or bitcoin.conf setting gen)\n"
|
||||
"It is set with the command line argument -gen (or lbrycrd.conf setting gen)\n"
|
||||
"It can also be set with the setgenerate call.\n"
|
||||
"\nResult\n"
|
||||
"true|false (boolean) If the server is set to generate coins or not\n"
|
||||
@@ -429,11 +429,11 @@ UniValue getblocktemplate(const UniValue& params, bool fHelp)
|
||||
if (strMode != "template")
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid mode");
|
||||
|
||||
if (vNodes.empty())
|
||||
throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, "Bitcoin is not connected!");
|
||||
//if (vNodes.empty())
|
||||
// throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, "Bitcoin is not connected!");
|
||||
|
||||
if (IsInitialBlockDownload())
|
||||
throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, "Bitcoin is downloading blocks...");
|
||||
throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, "LBRYcrd is downloading blocks...");
|
||||
|
||||
static unsigned int nTransactionsUpdatedLast;
|
||||
|
||||
|
||||
+11
-11
@@ -49,7 +49,7 @@ UniValue getinfo(const UniValue& params, bool fHelp)
|
||||
" \"version\": xxxxx, (numeric) the server version\n"
|
||||
" \"protocolversion\": xxxxx, (numeric) the protocol version\n"
|
||||
" \"walletversion\": xxxxx, (numeric) the wallet version\n"
|
||||
" \"balance\": xxxxxxx, (numeric) the total bitcoin balance of the wallet\n"
|
||||
" \"balance\": xxxxxxx, (numeric) the total LBC balance of the wallet\n"
|
||||
" \"blocks\": xxxxxx, (numeric) the current number of blocks processed in the server\n"
|
||||
" \"timeoffset\": xxxxx, (numeric) the time offset\n"
|
||||
" \"connections\": xxxxx, (numeric) the number of connections\n"
|
||||
@@ -59,8 +59,8 @@ UniValue getinfo(const UniValue& params, bool fHelp)
|
||||
" \"keypoololdest\": xxxxxx, (numeric) the timestamp (seconds since GMT epoch) of the oldest pre-generated key in the key pool\n"
|
||||
" \"keypoolsize\": xxxx, (numeric) how many new keys are pre-generated\n"
|
||||
" \"unlocked_until\": ttt, (numeric) the timestamp in seconds since epoch (midnight Jan 1 1970 GMT) that the wallet is unlocked for transfers, or 0 if the wallet is locked\n"
|
||||
" \"paytxfee\": x.xxxx, (numeric) the transaction fee set in btc/kb\n"
|
||||
" \"relayfee\": x.xxxx, (numeric) minimum relay fee for non-free transactions in btc/kb\n"
|
||||
" \"paytxfee\": x.xxxx, (numeric) the transaction fee set in LBC/kb\n"
|
||||
" \"relayfee\": x.xxxx, (numeric) minimum relay fee for non-free transactions in LBC/kb\n"
|
||||
" \"errors\": \"...\" (string) any error messages\n"
|
||||
"}\n"
|
||||
"\nExamples:\n"
|
||||
@@ -157,14 +157,14 @@ UniValue validateaddress(const UniValue& params, bool fHelp)
|
||||
{
|
||||
if (fHelp || params.size() != 1)
|
||||
throw runtime_error(
|
||||
"validateaddress \"bitcoinaddress\"\n"
|
||||
"\nReturn information about the given bitcoin address.\n"
|
||||
"validateaddress \"lbrycrdaddress\"\n"
|
||||
"\nReturn information about the given lbrycrd address.\n"
|
||||
"\nArguments:\n"
|
||||
"1. \"bitcoinaddress\" (string, required) The bitcoin address to validate\n"
|
||||
"1. \"lbrycrdaddress\" (string, required) The lbrycrd address to validate\n"
|
||||
"\nResult:\n"
|
||||
"{\n"
|
||||
" \"isvalid\" : true|false, (boolean) If the address is valid or not. If not, this is the only property returned.\n"
|
||||
" \"address\" : \"bitcoinaddress\", (string) The bitcoin address validated\n"
|
||||
" \"address\" : \"lbrycrdaddress\", (string) The lbrycrd address validated\n"
|
||||
" \"scriptPubKey\" : \"hex\", (string) The hex encoded scriptPubKey generated by the address\n"
|
||||
" \"ismine\" : true|false, (boolean) If the address is yours or not\n"
|
||||
" \"isscript\" : true|false, (boolean) If the key is a script\n"
|
||||
@@ -286,9 +286,9 @@ UniValue createmultisig(const UniValue& params, bool fHelp)
|
||||
|
||||
"\nArguments:\n"
|
||||
"1. nrequired (numeric, required) The number of required signatures out of the n keys or addresses.\n"
|
||||
"2. \"keys\" (string, required) A json array of keys which are bitcoin addresses or hex-encoded public keys\n"
|
||||
"2. \"keys\" (string, required) A json array of keys which are lbrycrd addresses or hex-encoded public keys\n"
|
||||
" [\n"
|
||||
" \"key\" (string) bitcoin address or hex-encoded public key\n"
|
||||
" \"key\" (string) lbrycrd address or hex-encoded public key\n"
|
||||
" ,...\n"
|
||||
" ]\n"
|
||||
|
||||
@@ -323,10 +323,10 @@ UniValue verifymessage(const UniValue& params, bool fHelp)
|
||||
{
|
||||
if (fHelp || params.size() != 3)
|
||||
throw runtime_error(
|
||||
"verifymessage \"bitcoinaddress\" \"signature\" \"message\"\n"
|
||||
"verifymessage \"lbrycrdaddress\" \"signature\" \"message\"\n"
|
||||
"\nVerify a signed message\n"
|
||||
"\nArguments:\n"
|
||||
"1. \"bitcoinaddress\" (string, required) The bitcoin address to use for the signature.\n"
|
||||
"1. \"lbrycrdaddress\" (string, required) The lbrycrd address to use for the signature.\n"
|
||||
"2. \"signature\" (string, required) The signature provided by the signer in base 64 encoding (see signmessage).\n"
|
||||
"3. \"message\" (string, required) The message that was signed.\n"
|
||||
"\nResult:\n"
|
||||
|
||||
@@ -0,0 +1,465 @@
|
||||
#include "main.h"
|
||||
#include "ncc.h"
|
||||
#include "rpcserver.h"
|
||||
#include "univalue/univalue.h"
|
||||
|
||||
UniValue getclaimsintrie(const UniValue& params, bool fHelp)
|
||||
{
|
||||
if (fHelp || params.size() > 0)
|
||||
throw std::runtime_error(
|
||||
"getclaimsintrie\n"
|
||||
"Return all claims in the name trie.\n"
|
||||
"Arguments:\n"
|
||||
"None\n"
|
||||
"Result: \n"
|
||||
"[\n"
|
||||
" {\n"
|
||||
" \"name\" (string) the name claimed\n"
|
||||
" \"claims\": [ (array of object) the claims for this name\n"
|
||||
" {\n"
|
||||
" \"txid\" (string) the txid of the claim\n"
|
||||
" \"n\" (numeric) the vout value of the claim\n"
|
||||
" \"amount\" (numeric) txout amount\n"
|
||||
" \"height\" (numeric) the height of the block in which this transaction is located\n"
|
||||
" \"value\" (string) the value of this claim\n"
|
||||
" }\n"
|
||||
" ]\n"
|
||||
" }\n"
|
||||
"]\n"
|
||||
);
|
||||
|
||||
LOCK(cs_main);
|
||||
UniValue ret(UniValue::VARR);
|
||||
|
||||
CCoinsViewCache view(pcoinsTip);
|
||||
std::vector<namedNodeType> nodes = pnccTrie->flattenTrie();
|
||||
|
||||
for (std::vector<namedNodeType>::iterator it = nodes.begin(); it != nodes.end(); ++it)
|
||||
{
|
||||
if (!it->second.values.empty())
|
||||
{
|
||||
UniValue node(UniValue::VOBJ);
|
||||
node.push_back(Pair("name", it->first));
|
||||
UniValue claims(UniValue::VARR);
|
||||
for (std::vector<CNodeValue>::iterator itClaims = it->second.values.begin(); itClaims != it->second.values.end(); ++itClaims)
|
||||
{
|
||||
UniValue claim(UniValue::VOBJ);
|
||||
claim.push_back(Pair("txid", itClaims->txhash.GetHex()));
|
||||
claim.push_back(Pair("n", (int)itClaims->nOut));
|
||||
claim.push_back(Pair("amount", itClaims->nAmount));
|
||||
claim.push_back(Pair("height", itClaims->nHeight));
|
||||
const CCoins* coin = view.AccessCoins(itClaims->txhash);
|
||||
if (!coin)
|
||||
{
|
||||
LogPrintf("%s: %s does not exist in the coins view, despite being associated with a name\n",
|
||||
__func__, itClaims->txhash.GetHex());
|
||||
claim.push_back(Pair("error", "No value found for claim"));
|
||||
}
|
||||
else if (coin->vout.size() < itClaims->nOut || coin->vout[itClaims->nOut].IsNull())
|
||||
{
|
||||
LogPrintf("%s: the specified txout of %s appears to have been spent\n", __func__, itClaims->txhash.GetHex());
|
||||
claim.push_back(Pair("error", "Txout spent"));
|
||||
}
|
||||
else
|
||||
{
|
||||
int op;
|
||||
std::vector<std::vector<unsigned char> > vvchParams;
|
||||
if (!DecodeNCCScript(coin->vout[itClaims->nOut].scriptPubKey, op, vvchParams))
|
||||
{
|
||||
LogPrintf("%s: the specified txout of %s does not have an NCC command\n", __func__, itClaims->txhash.GetHex());
|
||||
}
|
||||
std::string sValue(vvchParams[1].begin(), vvchParams[1].end());
|
||||
claim.push_back(Pair("value", sValue));
|
||||
}
|
||||
claims.push_back(claim);
|
||||
}
|
||||
node.push_back(Pair("claims", claims));
|
||||
ret.push_back(node);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
UniValue getnametrie(const UniValue& params, bool fHelp)
|
||||
{
|
||||
if (fHelp || params.size() > 0)
|
||||
throw std::runtime_error(
|
||||
"getnametrie\n"
|
||||
"Return the entire name trie.\n"
|
||||
"Arguments:\n"
|
||||
"None\n"
|
||||
"Result: \n"
|
||||
"{\n"
|
||||
" \"name\" (string) the name of the node\n"
|
||||
" \"hash\" (string) the hash of the node\n"
|
||||
" \"txid\" (string) (if value exists) the hash of the transaction which has successfully claimed this name\n"
|
||||
" \"n\" (numeric) (if value exists) vout value\n"
|
||||
" \"value\" (numeric) (if value exists) txout value\n"
|
||||
" \"height\" (numeric) (if value exists) the height of the block in which this transaction is located\n"
|
||||
"}\n"
|
||||
);
|
||||
|
||||
LOCK(cs_main);
|
||||
UniValue ret(UniValue::VARR);
|
||||
|
||||
std::vector<namedNodeType> nodes = pnccTrie->flattenTrie();
|
||||
for (std::vector<namedNodeType>::iterator it = nodes.begin(); it != nodes.end(); ++it)
|
||||
{
|
||||
UniValue node(UniValue::VOBJ);
|
||||
node.push_back(Pair("name", it->first));
|
||||
node.push_back(Pair("hash", it->second.hash.GetHex()));
|
||||
CNodeValue val;
|
||||
if (it->second.getBestValue(val))
|
||||
{
|
||||
node.push_back(Pair("txid", val.txhash.GetHex()));
|
||||
node.push_back(Pair("n", (int)val.nOut));
|
||||
node.push_back(Pair("value", ValueFromAmount(val.nAmount)));
|
||||
node.push_back(Pair("height", val.nHeight));
|
||||
}
|
||||
ret.push_back(node);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
UniValue getvalueforname(const UniValue& params, bool fHelp)
|
||||
{
|
||||
if (fHelp || params.size() != 1)
|
||||
throw std::runtime_error(
|
||||
"getvalueforname \"name\"\n"
|
||||
"Return the value associated with a name, if one exists\n"
|
||||
"Arguments:\n"
|
||||
"1. \"name\" (string) the name to look up\n"
|
||||
"Result: \n"
|
||||
"\"value\" (string) the value of the name, if it exists\n"
|
||||
"\"txid\" (string) the hash of the transaction which successfully claimed the name\n"
|
||||
"\"n\" (numeric) vout value\n"
|
||||
"\"amount\" (numeric) txout amount\n"
|
||||
"\"height\" (numeric) the height of the block in which this transaction is located\n"
|
||||
);
|
||||
LOCK(cs_main);
|
||||
std::string name = params[0].get_str();
|
||||
CNodeValue val;
|
||||
UniValue ret(UniValue::VOBJ);
|
||||
if (!pnccTrie->getInfoForName(name, val))
|
||||
return ret;
|
||||
CCoinsViewCache view(pcoinsTip);
|
||||
const CCoins* coin = view.AccessCoins(val.txhash);
|
||||
if (!coin)
|
||||
{
|
||||
LogPrintf("%s: %s does not exist in the coins view, despite being associated with a name\n",
|
||||
__func__, val.txhash.GetHex());
|
||||
return ret;
|
||||
}
|
||||
if (coin->vout.size() < val.nOut || coin->vout[val.nOut].IsNull())
|
||||
{
|
||||
LogPrintf("%s: the specified txout of %s appears to have been spent\n", __func__, val.txhash.GetHex());
|
||||
return ret;
|
||||
}
|
||||
|
||||
int op;
|
||||
std::vector<std::vector<unsigned char> > vvchParams;
|
||||
if (!DecodeNCCScript(coin->vout[val.nOut].scriptPubKey, op, vvchParams))
|
||||
{
|
||||
LogPrintf("%s: the specified txout of %s does not have an NCC command\n", __func__, val.txhash.GetHex());
|
||||
}
|
||||
std::string sValue(vvchParams[1].begin(), vvchParams[1].end());
|
||||
ret.push_back(Pair("value", sValue));
|
||||
ret.push_back(Pair("txid", val.txhash.GetHex()));
|
||||
ret.push_back(Pair("n", (int)val.nOut));
|
||||
ret.push_back(Pair("amount", val.nAmount));
|
||||
ret.push_back(Pair("height", val.nHeight));
|
||||
return ret;
|
||||
}
|
||||
|
||||
UniValue gettotalclaimednames(const UniValue& params, bool fHelp)
|
||||
{
|
||||
if (fHelp || params.size() != 0)
|
||||
throw std::runtime_error(
|
||||
"gettotalclaimednames\n"
|
||||
"Return the total number of names that have been\n"
|
||||
"successfully claimed, and therefore exist in the trie\n"
|
||||
"Arguments:\n"
|
||||
"Result:\n"
|
||||
"\"total names\" (numeric) the total number of\n"
|
||||
" names in the trie\n"
|
||||
);
|
||||
LOCK(cs_main);
|
||||
if (!pnccTrie)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
unsigned int num_names = pnccTrie->getTotalNamesInTrie();
|
||||
return int(num_names);
|
||||
}
|
||||
|
||||
UniValue gettotalclaims(const UniValue& params, bool fHelp)
|
||||
{
|
||||
if (fHelp || params.size() != 0)
|
||||
throw std::runtime_error(
|
||||
"gettotalclaims\n"
|
||||
"Return the total number of active claims in the trie\n"
|
||||
"Arguments:\n"
|
||||
"Result:\n"
|
||||
"\"total claims\" (numeric) the total number\n"
|
||||
" of active claims\n"
|
||||
);
|
||||
LOCK(cs_main);
|
||||
if (!pnccTrie)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
unsigned int num_claims = pnccTrie->getTotalClaimsInTrie();
|
||||
return int(num_claims);
|
||||
}
|
||||
|
||||
UniValue gettotalvalueofclaims(const UniValue& params, bool fHelp)
|
||||
{
|
||||
if (fHelp || params.size() > 1)
|
||||
throw std::runtime_error(
|
||||
"gettotalvalueofclaims\n"
|
||||
"Return the total value of the claims in the trie\n"
|
||||
"Arguments:\n"
|
||||
"1. \"controlling_only\" (boolean) only include the value\n"
|
||||
" of controlling claims\n"
|
||||
"Result:\n"
|
||||
"\"total value\" (numeric) the total value of the\n"
|
||||
" claims in the trie\n"
|
||||
);
|
||||
LOCK(cs_main);
|
||||
if (!pnccTrie)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
bool controlling_only = false;
|
||||
if (params.size() == 1)
|
||||
controlling_only = params[0].get_bool();
|
||||
CAmount total_amount = pnccTrie->getTotalValueOfClaimsInTrie(controlling_only);
|
||||
return ValueFromAmount(total_amount);
|
||||
}
|
||||
|
||||
UniValue getclaimsfortx(const UniValue& params, bool fHelp)
|
||||
{
|
||||
if (fHelp || params.size() != 1)
|
||||
throw std::runtime_error(
|
||||
"getclaimsfortx\n"
|
||||
"Return any claims or supports found in a transaction\n"
|
||||
"Arguments:\n"
|
||||
"1. \"txid\" (string) the txid of the transaction to check for unspent claims\n"
|
||||
"Result:\n"
|
||||
"[\n"
|
||||
" {\n"
|
||||
" \"nOut\" (numeric) the index of the claim in the transaction's list out outputs\n"
|
||||
" \"name\" (string) the name claimed\n"
|
||||
" \"value\" (string) the value of the claim\n"
|
||||
" \"depth\" (numeric) the depth of the transaction in the main chain\n"
|
||||
" \"in claim trie\" (boolean) whether the claim has made it into the trie\n"
|
||||
" \"is controlling\" (boolean) whether the claim is the current controlling claim for the name\n"
|
||||
" \"in queue\" (boolean) whether the claim is in a queue waiting to be inserted into the trie\n"
|
||||
" \"blocks to valid\" (numeric) if in a queue, the number of blocks until it's inserted into the trie\n"
|
||||
" }\n"
|
||||
"]\n"
|
||||
);
|
||||
|
||||
LOCK(cs_main);
|
||||
|
||||
uint256 hash;
|
||||
hash.SetHex(params[0].get_str());
|
||||
|
||||
UniValue ret(UniValue::VARR);
|
||||
|
||||
int op;
|
||||
std::vector<std::vector<unsigned char> > vvchParams;
|
||||
|
||||
CCoinsViewCache view(pcoinsTip);
|
||||
const CCoins* coin = view.AccessCoins(hash);
|
||||
std::vector<CTxOut> txouts;
|
||||
int nHeight = 0;
|
||||
if (!coin)
|
||||
{
|
||||
CTransaction tx;
|
||||
if (!mempool.lookup(hash, tx))
|
||||
{
|
||||
return NullUniValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
txouts = tx.vout;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
txouts = coin->vout;
|
||||
nHeight = coin->nHeight;
|
||||
}
|
||||
|
||||
for (unsigned int i = 0; i < txouts.size(); ++i)
|
||||
{
|
||||
if (!txouts[i].IsNull())
|
||||
{
|
||||
vvchParams.clear();
|
||||
const CTxOut& txout = txouts[i];
|
||||
UniValue o(UniValue::VOBJ);
|
||||
if (DecodeNCCScript(txout.scriptPubKey, op, vvchParams))
|
||||
{
|
||||
o.push_back(Pair("nOut", (int64_t)i));
|
||||
std::string sName(vvchParams[0].begin(), vvchParams[0].end());
|
||||
o.push_back(Pair("name", sName));
|
||||
std::string sValue(vvchParams[1].begin(), vvchParams[1].end());
|
||||
o.push_back(Pair("value", sValue));
|
||||
if (nHeight > 0)
|
||||
{
|
||||
o.push_back(Pair("depth", chainActive.Height() - nHeight));
|
||||
bool inClaimTrie = pnccTrie->haveClaim(sName, hash, i);
|
||||
o.push_back(Pair("in claim trie", inClaimTrie));
|
||||
if (inClaimTrie)
|
||||
{
|
||||
CNodeValue val;
|
||||
if (!pnccTrie->getInfoForName(sName, val))
|
||||
{
|
||||
LogPrintf("HaveClaim was true but getInfoForName returned false.");
|
||||
}
|
||||
o.push_back(Pair("is controlling", (val.txhash == hash && val.nOut == i)));
|
||||
}
|
||||
else
|
||||
{
|
||||
int nValidAtHeight;
|
||||
if (pnccTrie->haveClaimInQueue(sName, hash, i, coin->nHeight, nValidAtHeight))
|
||||
{
|
||||
o.push_back(Pair("in queue", true));
|
||||
o.push_back(Pair("blocks to valid", nValidAtHeight - chainActive.Height()));
|
||||
}
|
||||
else
|
||||
{
|
||||
o.push_back(Pair("in queue", false));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
o.push_back(Pair("depth", 0));
|
||||
o.push_back(Pair("in claim trie", false));
|
||||
o.push_back(Pair("in queue", false));
|
||||
}
|
||||
ret.push_back(o);
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
UniValue proofToJSON(const CNCCTrieProof& proof)
|
||||
{
|
||||
UniValue result(UniValue::VOBJ);
|
||||
UniValue nodes(UniValue::VARR);
|
||||
for (std::vector<CNCCTrieProofNode>::const_iterator itNode = proof.nodes.begin(); itNode != proof.nodes.end(); ++itNode)
|
||||
{
|
||||
UniValue node(UniValue::VOBJ);
|
||||
UniValue children(UniValue::VARR);
|
||||
for (std::vector<std::pair<unsigned char, uint256> >::const_iterator itChildren = itNode->children.begin(); itChildren != itNode->children.end(); ++itChildren)
|
||||
{
|
||||
UniValue child(UniValue::VOBJ);
|
||||
child.push_back(Pair("character", itChildren->first));
|
||||
if (!itChildren->second.IsNull())
|
||||
{
|
||||
child.push_back(Pair("nodeHash", itChildren->second.GetHex()));
|
||||
}
|
||||
children.push_back(child);
|
||||
}
|
||||
node.push_back(Pair("children", children));
|
||||
if (itNode->hasValue && !itNode->valHash.IsNull())
|
||||
{
|
||||
node.push_back(Pair("valueHash", itNode->valHash.GetHex()));
|
||||
}
|
||||
nodes.push_back(node);
|
||||
}
|
||||
result.push_back(Pair("nodes", nodes));
|
||||
if (proof.hasValue)
|
||||
{
|
||||
result.push_back(Pair("txhash", proof.txhash.GetHex()));
|
||||
result.push_back(Pair("nOut", (int)proof.nOut));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
UniValue getnameproof(const UniValue& params, bool fHelp)
|
||||
{
|
||||
if (fHelp || (params.size() != 1 && params.size() != 2))
|
||||
throw std::runtime_error(
|
||||
"getnameproof\n"
|
||||
"Return the cryptographic proof that a name maps to a value\n"
|
||||
"or doesn't.\n"
|
||||
"Arguments:\n"
|
||||
"1. \"name\" (string) the name to get a proof for\n"
|
||||
"2. \"blockhash\" (string, optional) the hash of the block\n"
|
||||
" which is the basis\n"
|
||||
" of the proof. If\n"
|
||||
" none is given, \n"
|
||||
" the latest block\n"
|
||||
" will be used.\n"
|
||||
"Result: \n"
|
||||
"{\n"
|
||||
" \"nodes\" : [ (array of object) full nodes (i.e.\n"
|
||||
" those which lead to\n"
|
||||
" the requested name)\n"
|
||||
" \"children\" : [ (array of object) the children of\n"
|
||||
" this node\n"
|
||||
" \"child\" : { (object) a child node, either leaf or\n"
|
||||
" reference to a full node\n"
|
||||
" \"character\" : \"char\" (string) the character which\n"
|
||||
" leads from the parent\n"
|
||||
" to this child node\n"
|
||||
" \"nodeHash\" : \"hash\" (string, if exists) the hash of\n"
|
||||
" the node if\n"
|
||||
" this is a \n"
|
||||
" leaf node\n"
|
||||
" }\n"
|
||||
" ]\n"
|
||||
" \"valueHash\" (string, if exists) the hash of this\n"
|
||||
" node's value, if\n"
|
||||
" it has one. If \n"
|
||||
" this is the\n"
|
||||
" requested name\n"
|
||||
" this will not\n"
|
||||
" exist whether\n"
|
||||
" the node has a\n"
|
||||
" value or not\n"
|
||||
" ]\n"
|
||||
" \"txhash\" : \"hash\" (string, if exists) the txid of the\n"
|
||||
" claim which controls\n"
|
||||
" this name, if there\n"
|
||||
" is one.\n"
|
||||
" \"nOut\" : n, (numeric) the nOut of the claim which\n"
|
||||
" controls this name, if there\n"
|
||||
" is one.\n"
|
||||
" }\n"
|
||||
"}\n");
|
||||
|
||||
LOCK(cs_main);
|
||||
std::string strName = params[0].get_str();
|
||||
uint256 blockHash;
|
||||
if (params.size() == 2)
|
||||
{
|
||||
std::string strBlockHash = params[1].get_str();
|
||||
blockHash = uint256S(strBlockHash);
|
||||
}
|
||||
else
|
||||
{
|
||||
blockHash = chainActive.Tip()->GetBlockHash();
|
||||
}
|
||||
|
||||
if (mapBlockIndex.count(blockHash) == 0)
|
||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Block not found");
|
||||
|
||||
CBlockIndex* pblockIndex = mapBlockIndex[blockHash];
|
||||
if (!chainActive.Contains(pblockIndex))
|
||||
throw JSONRPCError(RPC_INTERNAL_ERROR, "Block not in main chain");
|
||||
|
||||
if (chainActive.Tip()->nHeight > (pblockIndex->nHeight + 20))
|
||||
throw JSONRPCError(RPC_INTERNAL_ERROR, "Block too deep to generate proof");
|
||||
|
||||
CNCCTrieProof proof;
|
||||
if (!GetProofForName(pblockIndex, strName, proof))
|
||||
throw JSONRPCError(RPC_INTERNAL_ERROR, "Failed to generate proof");
|
||||
|
||||
return proofToJSON(proof);
|
||||
}
|
||||
+2
-2
@@ -233,7 +233,7 @@ UniValue getaddednodeinfo(const UniValue& params, bool fHelp)
|
||||
" \"connected\" : true|false, (boolean) If connected\n"
|
||||
" \"addresses\" : [\n"
|
||||
" {\n"
|
||||
" \"address\" : \"192.168.0.201:8333\", (string) The bitcoin server host and port\n"
|
||||
" \"address\" : \"192.168.0.201:8333\", (string) The lbrycrd server host and port\n"
|
||||
" \"connected\" : \"outbound\" (string) connection, inbound or outbound\n"
|
||||
" }\n"
|
||||
" ,...\n"
|
||||
@@ -399,7 +399,7 @@ UniValue getnetworkinfo(const UniValue& params, bool fHelp)
|
||||
" }\n"
|
||||
" ,...\n"
|
||||
" ],\n"
|
||||
" \"relayfee\": x.xxxxxxxx, (numeric) minimum relay fee for non-free transactions in btc/kb\n"
|
||||
" \"relayfee\": x.xxxxxxxx, (numeric) minimum relay fee for non-free transactions in LBC/kb\n"
|
||||
" \"localaddresses\": [ (array) list of local addresses\n"
|
||||
" {\n"
|
||||
" \"address\": \"xxxx\", (string) network address\n"
|
||||
|
||||
+3
-3
@@ -42,7 +42,7 @@ string HTTPPost(const string& strMsg, const map<string,string>& mapRequestHeader
|
||||
{
|
||||
ostringstream s;
|
||||
s << "POST / HTTP/1.1\r\n"
|
||||
<< "User-Agent: bitcoin-json-rpc/" << FormatFullVersion() << "\r\n"
|
||||
<< "User-Agent: lbrycrd-json-rpc/" << FormatFullVersion() << "\r\n"
|
||||
<< "Host: 127.0.0.1\r\n"
|
||||
<< "Content-Type: application/json\r\n"
|
||||
<< "Content-Length: " << strMsg.size() << "\r\n"
|
||||
@@ -77,7 +77,7 @@ string HTTPError(int nStatus, bool keepalive, bool headersOnly)
|
||||
if (nStatus == HTTP_UNAUTHORIZED)
|
||||
return strprintf("HTTP/1.0 401 Authorization Required\r\n"
|
||||
"Date: %s\r\n"
|
||||
"Server: bitcoin-json-rpc/%s\r\n"
|
||||
"Server: lbrycrd-json-rpc/%s\r\n"
|
||||
"WWW-Authenticate: Basic realm=\"jsonrpc\"\r\n"
|
||||
"Content-Type: text/html\r\n"
|
||||
"Content-Length: 296\r\n"
|
||||
@@ -104,7 +104,7 @@ string HTTPReplyHeader(int nStatus, bool keepalive, size_t contentLength, const
|
||||
"Connection: %s\r\n"
|
||||
"Content-Length: %u\r\n"
|
||||
"Content-Type: %s\r\n"
|
||||
"Server: bitcoin-json-rpc/%s\r\n"
|
||||
"Server: lbrycrd-json-rpc/%s\r\n"
|
||||
"\r\n",
|
||||
nStatus,
|
||||
httpStatusDescription(nStatus),
|
||||
|
||||
@@ -144,7 +144,7 @@ UniValue getrawtransaction(const UniValue& params, bool fHelp)
|
||||
" ],\n"
|
||||
" \"vout\" : [ (array of json objects)\n"
|
||||
" {\n"
|
||||
" \"value\" : x.xxx, (numeric) The value in btc\n"
|
||||
" \"value\" : x.xxx, (numeric) The value in LBC\n"
|
||||
" \"n\" : n, (numeric) index\n"
|
||||
" \"scriptPubKey\" : { (json object)\n"
|
||||
" \"asm\" : \"asm\", (string) the asm\n"
|
||||
@@ -152,7 +152,7 @@ UniValue getrawtransaction(const UniValue& params, bool fHelp)
|
||||
" \"reqSigs\" : n, (numeric) The required sigs\n"
|
||||
" \"type\" : \"pubkeyhash\", (string) The type, eg 'pubkeyhash'\n"
|
||||
" \"addresses\" : [ (json array of string)\n"
|
||||
" \"bitcoinaddress\" (string) bitcoin address\n"
|
||||
" \"lbrycrdaddress\" (string) lbrycrd address\n"
|
||||
" ,...\n"
|
||||
" ]\n"
|
||||
" }\n"
|
||||
@@ -330,7 +330,7 @@ UniValue createrawtransaction(const UniValue& params, bool fHelp)
|
||||
" ]\n"
|
||||
"2. \"addresses\" (string, required) a json object with addresses as keys and amounts as values\n"
|
||||
" {\n"
|
||||
" \"address\": x.xxx (numeric, required) The key is the bitcoin address, the value is the btc amount\n"
|
||||
" \"address\": x.xxx (numeric, required) The key is the lbrycrd address, the value is the LBC amount\n"
|
||||
" ,...\n"
|
||||
" }\n"
|
||||
|
||||
@@ -372,7 +372,7 @@ UniValue createrawtransaction(const UniValue& params, bool fHelp)
|
||||
BOOST_FOREACH(const string& name_, addrList) {
|
||||
CBitcoinAddress address(name_);
|
||||
if (!address.IsValid())
|
||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid Bitcoin address: ")+name_);
|
||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid lbrycrd address: ")+name_);
|
||||
|
||||
if (setAddress.count(address))
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, duplicated address: ")+name_);
|
||||
@@ -417,7 +417,7 @@ UniValue decoderawtransaction(const UniValue& params, bool fHelp)
|
||||
" ],\n"
|
||||
" \"vout\" : [ (array of json objects)\n"
|
||||
" {\n"
|
||||
" \"value\" : x.xxx, (numeric) The value in btc\n"
|
||||
" \"value\" : x.xxx, (numeric) The value in LBC\n"
|
||||
" \"n\" : n, (numeric) index\n"
|
||||
" \"scriptPubKey\" : { (json object)\n"
|
||||
" \"asm\" : \"asm\", (string) the asm\n"
|
||||
@@ -425,7 +425,7 @@ UniValue decoderawtransaction(const UniValue& params, bool fHelp)
|
||||
" \"reqSigs\" : n, (numeric) The required sigs\n"
|
||||
" \"type\" : \"pubkeyhash\", (string) The type, eg 'pubkeyhash'\n"
|
||||
" \"addresses\" : [ (json array of string)\n"
|
||||
" \"12tvKAXCxZjSmdNbao16dKXC8tRWfcF5oc\" (string) bitcoin address\n"
|
||||
" \"12tvKAXCxZjSmdNbao16dKXC8tRWfcF5oc\" (string) lbrycrd address\n"
|
||||
" ,...\n"
|
||||
" ]\n"
|
||||
" }\n"
|
||||
@@ -468,7 +468,7 @@ UniValue decodescript(const UniValue& params, bool fHelp)
|
||||
" \"type\":\"type\", (string) The output type\n"
|
||||
" \"reqSigs\": n, (numeric) The required signatures\n"
|
||||
" \"addresses\": [ (json array of string)\n"
|
||||
" \"address\" (string) bitcoin address\n"
|
||||
" \"address\" (string) lbrycrd address\n"
|
||||
" ,...\n"
|
||||
" ],\n"
|
||||
" \"p2sh\",\"address\" (string) script address\n"
|
||||
|
||||
+20
-6
@@ -251,10 +251,10 @@ UniValue stop(const UniValue& params, bool fHelp)
|
||||
if (fHelp || params.size() > 1)
|
||||
throw runtime_error(
|
||||
"stop\n"
|
||||
"\nStop Bitcoin server.");
|
||||
"\nStop LBRYcrd server.");
|
||||
// Shutdown will take long enough that the response should get back
|
||||
StartShutdown();
|
||||
return "Bitcoin server stopping";
|
||||
return "LBRYcrd server stopping";
|
||||
}
|
||||
|
||||
|
||||
@@ -366,6 +366,10 @@ static const CRPCCommand vRPCCommands[] =
|
||||
{ "wallet", "move", &movecmd, false },
|
||||
{ "wallet", "sendfrom", &sendfrom, false },
|
||||
{ "wallet", "sendmany", &sendmany, false },
|
||||
{ "wallet", "claimname", &claimname, false },
|
||||
{ "wallet", "listnameclaims", &listnameclaims, false },
|
||||
{ "wallet", "updatename", &updatename, false },
|
||||
{ "wallet", "abandonname", &abandonname, false },
|
||||
{ "wallet", "sendtoaddress", &sendtoaddress, false },
|
||||
{ "wallet", "setaccount", &setaccount, true },
|
||||
{ "wallet", "settxfee", &settxfee, true },
|
||||
@@ -374,6 +378,16 @@ static const CRPCCommand vRPCCommands[] =
|
||||
{ "wallet", "walletpassphrasechange", &walletpassphrasechange, true },
|
||||
{ "wallet", "walletpassphrase", &walletpassphrase, true },
|
||||
#endif // ENABLE_WALLET
|
||||
|
||||
/* NCC trie */
|
||||
{ "nametrie", "getclaimsintrie", &getclaimsintrie, true },
|
||||
{ "nametrie", "getnametrie", &getnametrie, true },
|
||||
{ "nametrie", "getvalueforname", &getvalueforname, true },
|
||||
{ "nametrie", "gettotalclaimednames", &gettotalclaimednames, true },
|
||||
{ "nametrie", "gettotalclaims", &gettotalclaims, true },
|
||||
{ "nametrie", "gettotalvalueofclaims", &gettotalvalueofclaims, true },
|
||||
{ "nametrie", "getclaimsfortx", &getclaimsfortx, true },
|
||||
{ "nametrie", "getnameproof", &getnameproof, true },
|
||||
};
|
||||
|
||||
CRPCTable::CRPCTable()
|
||||
@@ -598,16 +612,16 @@ void StartRPCThreads()
|
||||
unsigned char rand_pwd[32];
|
||||
GetRandBytes(rand_pwd, 32);
|
||||
uiInterface.ThreadSafeMessageBox(strprintf(
|
||||
_("To use bitcoind, or the -server option to bitcoin-qt, you must set an rpcpassword in the configuration file:\n"
|
||||
_("To use lbrycrdd, or the -server option to lbrycrd-qt, you must set an rpcpassword in the configuration file:\n"
|
||||
"%s\n"
|
||||
"It is recommended you use the following random password:\n"
|
||||
"rpcuser=bitcoinrpc\n"
|
||||
"rpcuser=rpcuser\n"
|
||||
"rpcpassword=%s\n"
|
||||
"(you do not need to remember this password)\n"
|
||||
"The username and password MUST NOT be the same.\n"
|
||||
"If the file does not exist, create it with owner-readable-only file permissions.\n"
|
||||
"It is also recommended to set alertnotify so you are notified of problems;\n"
|
||||
"for example: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com\n"),
|
||||
"for example: alertnotify=echo %%s | mail -s \"LBRYcrd Alert\" admin@foo.com\n"),
|
||||
GetConfigFile().string(),
|
||||
EncodeBase58(&rand_pwd[0],&rand_pwd[0]+32)),
|
||||
"", CClientUIInterface::MSG_ERROR | CClientUIInterface::SECURE);
|
||||
@@ -1025,7 +1039,7 @@ UniValue CRPCTable::execute(const std::string &strMethod, const UniValue ¶ms
|
||||
|
||||
std::string HelpExampleCli(const std::string& methodname, const std::string& args)
|
||||
{
|
||||
return "> bitcoin-cli " + methodname + " " + args + "\n";
|
||||
return "> lbrycrd-cli " + methodname + " " + args + "\n";
|
||||
}
|
||||
|
||||
std::string HelpExampleRpc(const std::string& methodname, const std::string& args)
|
||||
|
||||
@@ -177,6 +177,10 @@ extern UniValue getrawchangeaddress(const UniValue& params, bool fHelp);
|
||||
extern UniValue setaccount(const UniValue& params, bool fHelp);
|
||||
extern UniValue getaccount(const UniValue& params, bool fHelp);
|
||||
extern UniValue getaddressesbyaccount(const UniValue& params, bool fHelp);
|
||||
extern UniValue claimname(const UniValue& params, bool fHelp);
|
||||
extern UniValue listnameclaims(const UniValue& params, bool fHelp);
|
||||
extern UniValue updatename(const UniValue& params, bool fHelp);
|
||||
extern UniValue abandonname(const UniValue& params, bool fHelp);
|
||||
extern UniValue sendtoaddress(const UniValue& params, bool fHelp);
|
||||
extern UniValue signmessage(const UniValue& params, bool fHelp);
|
||||
extern UniValue verifymessage(const UniValue& params, bool fHelp);
|
||||
@@ -237,6 +241,15 @@ extern UniValue getchaintips(const UniValue& params, bool fHelp);
|
||||
extern UniValue invalidateblock(const UniValue& params, bool fHelp);
|
||||
extern UniValue reconsiderblock(const UniValue& params, bool fHelp);
|
||||
|
||||
extern UniValue getclaimsintrie(const UniValue& params, bool fHelp); // in rpcncctrie.cpp
|
||||
extern UniValue getnametrie(const UniValue& params, bool fHelp); // in rpcncctrie.cpp
|
||||
extern UniValue getvalueforname(const UniValue& params, bool fHelp);
|
||||
extern UniValue gettotalclaimednames(const UniValue& params, bool fHelp);
|
||||
extern UniValue gettotalclaims(const UniValue& params, bool fHelp);
|
||||
extern UniValue gettotalvalueofclaims(const UniValue& params, bool fHelp);
|
||||
extern UniValue getclaimsfortx(const UniValue& params, bool fHelp);
|
||||
extern UniValue getnameproof(const UniValue& params, bool fHelp);
|
||||
|
||||
// in rest.cpp
|
||||
extern bool HTTPReq_REST(AcceptedConnection *conn,
|
||||
const std::string& strURI,
|
||||
|
||||
@@ -31,6 +31,7 @@ enum opcodetype
|
||||
// push value
|
||||
OP_0 = 0x00,
|
||||
OP_FALSE = OP_0,
|
||||
OP_CLAIM_NAME = OP_0,
|
||||
OP_PUSHDATA1 = 0x4c,
|
||||
OP_PUSHDATA2 = 0x4d,
|
||||
OP_PUSHDATA4 = 0x4e,
|
||||
|
||||
+4
-2
@@ -10,7 +10,7 @@
|
||||
#include "keystore.h"
|
||||
#include "script/standard.h"
|
||||
#include "uint256.h"
|
||||
|
||||
#include "ncc.h"
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
using namespace std;
|
||||
@@ -66,8 +66,10 @@ static bool SignStep(const BaseSignatureCreator& creator, const CScript& scriptP
|
||||
{
|
||||
scriptSigRet.clear();
|
||||
|
||||
const CScript& strippedScriptPubKey = StripNCCScriptPrefix(scriptPubKey);
|
||||
|
||||
vector<valtype> vSolutions;
|
||||
if (!Solver(scriptPubKey, whichTypeRet, vSolutions))
|
||||
if (!Solver(strippedScriptPubKey, whichTypeRet, vSolutions))
|
||||
return false;
|
||||
|
||||
CKeyID keyID;
|
||||
|
||||
@@ -20,8 +20,8 @@ BOOST_FIXTURE_TEST_SUITE(Checkpoints_tests, BasicTestingSetup)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(sanity)
|
||||
{
|
||||
const Checkpoints::CCheckpointData& checkpoints = Params(CBaseChainParams::MAIN).Checkpoints();
|
||||
BOOST_CHECK(Checkpoints::GetTotalBlocksEstimate(checkpoints) >= 134444);
|
||||
//const Checkpoints::CCheckpointData& checkpoints = Params(CBaseChainParams::MAIN).Checkpoints();
|
||||
//BOOST_CHECK(Checkpoints::GetTotalBlocksEstimate(checkpoints) >= 134444);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
+94
-17
@@ -17,6 +17,7 @@
|
||||
#include "streams.h"
|
||||
#include "util.h"
|
||||
#include "utilstrencodings.h"
|
||||
#include "key.h"
|
||||
|
||||
#include "test/test_bitcoin.h"
|
||||
|
||||
@@ -26,12 +27,79 @@
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#if 0
|
||||
//
|
||||
bool SignAlert(CAlert &alert)
|
||||
{
|
||||
CKey key;
|
||||
std::vector<unsigned char> vchkey = ParseHex("hex output of HexStr(CKey.GetPrivKey)");
|
||||
CPrivKey privKey(vchkey.begin(), vchkey.end());
|
||||
key.SetPrivKey(privKey, false);
|
||||
|
||||
CDataStream sMsg(SER_NETWORK, PROTOCOL_VERSION);
|
||||
sMsg << *(CUnsignedAlert*)&alert;
|
||||
alert.vchMsg = std::vector<unsigned char>(sMsg.begin(), sMsg.end());
|
||||
|
||||
if (!key.Sign(Hash(alert.vchMsg.begin(), alert.vchMsg.end()), alert.vchSig))
|
||||
{
|
||||
LogPrintf("Sign Alert() : key.Sign failed\n");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SignAndSave(CAlert &alert, CDataStream &buffer)
|
||||
{
|
||||
if (!SignAlert(alert))
|
||||
{
|
||||
LogPrintf("SignAndSave() : could not sign alert\n");
|
||||
return false;
|
||||
}
|
||||
buffer << alert;
|
||||
return true;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
std::string HexStrArray(const T itbegin, const T itend)
|
||||
{
|
||||
std::string rv;
|
||||
static const char hexmap[16] = { '0', '1', '2', '3', '4', '5', '6', '7',
|
||||
'8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
|
||||
rv.reserve((itend-itbegin)*3);
|
||||
int i = 0;
|
||||
for(T it = itbegin; it < itend; ++it)
|
||||
{
|
||||
unsigned char val = (unsigned char)(*it);
|
||||
if(it != itbegin)
|
||||
{
|
||||
if (i % 8 == 0)
|
||||
rv.push_back('\n');
|
||||
else
|
||||
rv.push_back(' ');
|
||||
}
|
||||
rv.push_back('0');
|
||||
rv.push_back('x');
|
||||
rv.push_back(hexmap[val>>4]);
|
||||
rv.push_back(hexmap[val&15]);
|
||||
rv.push_back(',');
|
||||
i++;
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
inline std::string HexStrArray(const T& vch)
|
||||
{
|
||||
return HexStrArray(vch.begin(), vch.end());
|
||||
}
|
||||
|
||||
|
||||
// alertTests contains 7 alerts, generated with this code:
|
||||
// (SignAndSave code not shown, alert signing key is secret)
|
||||
//
|
||||
void GenerateAlertTests()
|
||||
{
|
||||
CDataStream sBuffer(SER_DISK, CLIENT_VERSION);
|
||||
|
||||
CAlert alert;
|
||||
alert.nRelayUntil = 60;
|
||||
alert.nExpiration = 24 * 60 * 60;
|
||||
@@ -43,45 +111,54 @@
|
||||
alert.strComment = "Alert comment";
|
||||
alert.strStatusBar = "Alert 1";
|
||||
|
||||
SignAndSave(alert, "test/alertTests");
|
||||
SignAndSave(alert, sBuffer);
|
||||
|
||||
alert.setSubVer.insert(std::string("/Satoshi:0.1.0/"));
|
||||
alert.strStatusBar = "Alert 1 for Satoshi 0.1.0";
|
||||
SignAndSave(alert, "test/alertTests");
|
||||
SignAndSave(alert, sBuffer);
|
||||
|
||||
alert.setSubVer.insert(std::string("/Satoshi:0.2.0/"));
|
||||
alert.strStatusBar = "Alert 1 for Satoshi 0.1.0, 0.2.0";
|
||||
SignAndSave(alert, "test/alertTests");
|
||||
SignAndSave(alert, sBuffer);
|
||||
|
||||
alert.setSubVer.clear();
|
||||
++alert.nID;
|
||||
alert.nCancel = 1;
|
||||
alert.nPriority = 100;
|
||||
alert.strStatusBar = "Alert 2, cancels 1";
|
||||
SignAndSave(alert, "test/alertTests");
|
||||
SignAndSave(alert, sBuffer);
|
||||
|
||||
alert.nExpiration += 60;
|
||||
++alert.nID;
|
||||
SignAndSave(alert, "test/alertTests");
|
||||
SignAndSave(alert, sBuffer);
|
||||
|
||||
++alert.nID;
|
||||
alert.nMinVer = 11;
|
||||
alert.nMaxVer = 22;
|
||||
SignAndSave(alert, "test/alertTests");
|
||||
SignAndSave(alert, sBuffer);
|
||||
|
||||
++alert.nID;
|
||||
alert.strStatusBar = "Alert 2 for Satoshi 0.1.0";
|
||||
alert.setSubVer.insert(std::string("/Satoshi:0.1.0/"));
|
||||
SignAndSave(alert, "test/alertTests");
|
||||
SignAndSave(alert, sBuffer);
|
||||
|
||||
++alert.nID;
|
||||
alert.nMinVer = 0;
|
||||
alert.nMaxVer = 999999;
|
||||
alert.strStatusBar = "Evil Alert'; /bin/ls; echo '";
|
||||
alert.setSubVer.clear();
|
||||
SignAndSave(alert, "test/alertTests");
|
||||
SignAndSave(alert, sBuffer);
|
||||
|
||||
std::vector<unsigned char> vch = std::vector<unsigned char>(sBuffer.begin(), sBuffer.end());
|
||||
|
||||
std::ofstream f;
|
||||
f.open("alertTest.raw");
|
||||
for (std::vector<unsigned char>::iterator itvch = vch.begin(); itvch != vch.end(); ++itvch)
|
||||
{
|
||||
f << *itvch;
|
||||
}
|
||||
f.close();
|
||||
}
|
||||
#endif
|
||||
|
||||
struct ReadAlerts : public TestingSetup
|
||||
{
|
||||
@@ -202,7 +279,7 @@ BOOST_AUTO_TEST_CASE(PartitionAlert)
|
||||
// Test PartitionCheck
|
||||
CCriticalSection csDummy;
|
||||
CChain chainDummy;
|
||||
CBlockIndex indexDummy[100];
|
||||
CBlockIndex indexDummy[2000];
|
||||
CChainParams& params = Params(CBaseChainParams::MAIN);
|
||||
int64_t nPowTargetSpacing = params.GetConsensus().nPowTargetSpacing;
|
||||
|
||||
@@ -210,17 +287,17 @@ BOOST_AUTO_TEST_CASE(PartitionAlert)
|
||||
// an arbitrary time:
|
||||
int64_t now = 1427379054;
|
||||
SetMockTime(now);
|
||||
for (int i = 0; i < 100; i++)
|
||||
for (int i = 0; i < 2000; i++)
|
||||
{
|
||||
indexDummy[i].phashBlock = NULL;
|
||||
if (i == 0) indexDummy[i].pprev = NULL;
|
||||
else indexDummy[i].pprev = &indexDummy[i-1];
|
||||
indexDummy[i].nHeight = i;
|
||||
indexDummy[i].nTime = now - (100-i)*nPowTargetSpacing;
|
||||
indexDummy[i].nTime = now - (2000-i)*nPowTargetSpacing;
|
||||
// Other members don't matter, the partition check code doesn't
|
||||
// use them
|
||||
}
|
||||
chainDummy.SetTip(&indexDummy[99]);
|
||||
chainDummy.SetTip(&indexDummy[1999]);
|
||||
|
||||
// Test 1: chain with blocks every nPowTargetSpacing seconds,
|
||||
// as normal, no worries:
|
||||
@@ -246,8 +323,8 @@ BOOST_AUTO_TEST_CASE(PartitionAlert)
|
||||
now += 60*60*24; // Pretend it is a day later
|
||||
SetMockTime(now);
|
||||
int64_t quickSpacing = nPowTargetSpacing*2/5;
|
||||
for (int i = 0; i < 100; i++) // Tweak chain timestamps:
|
||||
indexDummy[i].nTime = now - (100-i)*quickSpacing;
|
||||
for (int i = 0; i < 2000; i++) // Tweak chain timestamps:
|
||||
indexDummy[i].nTime = now - (2000-i)*quickSpacing;
|
||||
PartitionCheck(falseFunc, csDummy, chainDummy, nPowTargetSpacing);
|
||||
BOOST_CHECK(!strMiscWarning.empty());
|
||||
BOOST_TEST_MESSAGE(std::string("Got alert text: ")+strMiscWarning);
|
||||
|
||||
@@ -182,6 +182,7 @@ BOOST_AUTO_TEST_CASE(bloom_match)
|
||||
BOOST_CHECK_MESSAGE(!filter.IsRelevantAndUpdate(tx), "Simple Bloom filter matched COutPoint for an output we didn't care about");
|
||||
}
|
||||
|
||||
/* TODO: put these tests back in when there are real blocks to use
|
||||
BOOST_AUTO_TEST_CASE(merkle_block_1)
|
||||
{
|
||||
// Random real block (0000000000013b8ab2cd513b0261a14096412195a72a0c4827d229dcc7e0f7af)
|
||||
@@ -459,6 +460,7 @@ BOOST_AUTO_TEST_CASE(merkle_block_4_test_update_none)
|
||||
BOOST_CHECK(!filter.contains(COutPoint(uint256S("0x147caa76786596590baa4e98f5d9f48b86c7765e489f7a6ff3360fe5c674360b"), 0)));
|
||||
BOOST_CHECK(!filter.contains(COutPoint(uint256S("0x02981fa052f0481dbc5868f4fc2166035a10f27a03cfd2de67326471df5bc041"), 0)));
|
||||
}
|
||||
*/
|
||||
|
||||
static std::vector<unsigned char> RandomData()
|
||||
{
|
||||
|
||||
Binary file not shown.
@@ -53,7 +53,7 @@ BOOST_AUTO_TEST_CASE(subsidy_limit_test)
|
||||
nSum += nSubsidy * 1000;
|
||||
BOOST_CHECK(MoneyRange(nSum));
|
||||
}
|
||||
BOOST_CHECK_EQUAL(nSum, 2099999997690000ULL);
|
||||
BOOST_CHECK_EQUAL(nSum, 20781250000000000LL);
|
||||
}
|
||||
|
||||
bool ReturnFalse() { return false; }
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
BOOST_FIXTURE_TEST_SUITE(miner_tests, TestingSetup)
|
||||
|
||||
static
|
||||
/*static
|
||||
struct {
|
||||
unsigned char extranonce;
|
||||
unsigned int nonce;
|
||||
@@ -48,6 +48,55 @@ struct {
|
||||
{1, 0x3141c7c1}, {1, 0xb3b595f4}, {1, 0x735abf08}, {5, 0x623bfbce},
|
||||
{2, 0xd351e722}, {1, 0xf4ca48c9}, {1, 0x5b19c670}, {1, 0xa164bf0e},
|
||||
{2, 0xbbbeb305}, {2, 0xfe1c810a},
|
||||
};*/
|
||||
|
||||
/*static
|
||||
struct {
|
||||
unsigned char extranonce;
|
||||
unsigned int nonce;
|
||||
} blockinfo[] = {
|
||||
{4, 0x00000000}, {2, 0x00000001}, {1, 0x00000002}, {1, 0x00000000}, //0
|
||||
{2, 0x00000001}, {2, 0x00000001}, {1, 0x00000001}, {2, 0x00000000}, //4
|
||||
{2, 0x00000001}, {1, 0x00000000}, {1, 0x00000001}, {2, 0x00000001}, //8
|
||||
{2, 0x00000003}, {1, 0x00000001}, {2, 0x00000001}, {2, 0x00000001}, //12
|
||||
{1, 0x00000001}, {2, 0x00000000}, {1, 0x00000005}, {1, 0x00000001}, //16
|
||||
{3, 0x00000000}, {2, 0x00000000}, {2, 0x00000000}, {1, 0x00000004}, //20
|
||||
{2, 0x00000000}, {1, 0x00000000}, {2, 0x00000002}, {2, 0x00000003}, //24
|
||||
{2, 0x00000001}, {2, 0x00000001}, {2, 0x00000000}, {2, 0x00000000}, //28
|
||||
{1, 0x00000001}, {2, 0x00000000}, {2, 0x00000001}, {1, 0x00000000}, //32
|
||||
{2, 0x00000000}, {1, 0x00000001}, {2, 0x00000000}, {1, 0x00000000}, //36
|
||||
{1, 0x00000000}, {3, 0x00000000}, {2, 0x00000005}, {5, 0x00000000}, //40
|
||||
{1, 0x00000002}, {5, 0x00000001}, {1, 0x00000001}, {1, 0x00000001}, //44
|
||||
{1, 0x00000001}, {2, 0x00000002}, {1, 0x00000002}, {1, 0x00000001}, //48
|
||||
{1, 0x00000000}, {1, 0x00000000}, {5, 0x00000002}, {5, 0x00000000}, //52
|
||||
{1, 0x00000000}, {1, 0x00000000}, {6, 0x00000001}, {2, 0x00000000}, //56
|
||||
{2, 0x00000003}, {1, 0x00000000}, {1, 0x00000000}, {1, 0x00000000}, //60
|
||||
{2, 0x00000000}, {2, 0x00000001}, {1, 0x00000000}, {1, 0x00000001}, //64
|
||||
{1, 0x00000003}, {5, 0x00000000}, {5, 0x00000000}, {1, 0x00000002}, //68
|
||||
{1, 0x00000000}, {2, 0x00000001}, {2, 0x00000004}, {1, 0x00000000}, //72
|
||||
{2, 0x00000001}, {1, 0x00000002}, {2, 0x00000004}, {2, 0x00000000}, //76
|
||||
{1, 0x00000000}, {1, 0x00000002}, {1, 0x00000000}, {5, 0x00000002}, //80
|
||||
{1, 0x00000001}, {1, 0x00000003}, {1, 0x00000000}, {1, 0x00000002}, //84
|
||||
{1, 0x00000000}, {1, 0x00000000}, {1, 0x00000002}, {2, 0x00000000}, //88
|
||||
{0, 0x00000000}, {1, 0x00000000}, {2, 0x00000001}, {2, 0x00000001}, //92
|
||||
{2, 0x00000000}, {1, 0x00000000}, {1, 0x00000000}, {1, 0x00000000}, //96
|
||||
{1, 0x00000000}, {1, 0x00000000}, {1, 0x00000000}, {5, 0x00000000}, //100
|
||||
{2, 0x00000000}, {1, 0x00000002}, {1, 0x00000000}, {1, 0x00000001}, //104
|
||||
{2, 0x00000003}, {2, 0x00000000}, //108
|
||||
};*/
|
||||
|
||||
const unsigned int nonces[] = {
|
||||
114541, 40175, 23379, 121337, 4042, 35872, 42421, 145983, 4319, 8578,
|
||||
41220, 74215, 146557, 50967, 88259, 58152, 268596, 5792, 143361, 44697,
|
||||
43002, 21193, 70268, 162059, 38523, 30695, 138206, 87472, 134523, 57662,
|
||||
9345, 155238, 43247, 16926, 275759, 12455, 28819, 106643, 45302, 60635,
|
||||
154668, 2603, 450823, 53229, 165143, 105432, 165849, 25684, 75902, 56928,
|
||||
14741, 30997, 8054, 37001, 18039, 1756, 121352, 93199, 34162, 30404,
|
||||
40672, 8901, 67062, 36928, 29084, 73141, 61906, 12881, 114189, 47550,
|
||||
9109, 118675, 12945, 190955, 5882, 144237, 38280, 56629, 69485, 32170,
|
||||
51951, 117891, 6592, 22601, 5958, 70998, 193724, 11394, 40056, 14009,
|
||||
8935, 15990, 22127, 13847, 6130, 60578, 13413, 33884, 91806, 44141,
|
||||
24658, 5826, 148899, 32744, 42810, 9978, 54633, 153655, 28932, 73692
|
||||
};
|
||||
|
||||
// NOTE: These tests rely on CreateNewBlock doing its own self-validation!
|
||||
@@ -68,7 +117,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
|
||||
// We can't make transactions until we have inputs
|
||||
// Therefore, load 100 blocks :)
|
||||
std::vector<CTransaction*>txFirst;
|
||||
for (unsigned int i = 0; i < sizeof(blockinfo)/sizeof(*blockinfo); ++i)
|
||||
for (unsigned int i = 0; i < 110; ++i)
|
||||
{
|
||||
CBlock *pblock = &pblocktemplate->block; // pointer for convenience
|
||||
pblock->nVersion = 1;
|
||||
@@ -76,14 +125,28 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
|
||||
CMutableTransaction txCoinbase(pblock->vtx[0]);
|
||||
txCoinbase.nVersion = 1;
|
||||
txCoinbase.vin[0].scriptSig = CScript();
|
||||
txCoinbase.vin[0].scriptSig.push_back(blockinfo[i].extranonce);
|
||||
txCoinbase.vin[0].scriptSig.push_back(0);
|
||||
txCoinbase.vin[0].scriptSig.push_back(chainActive.Height());
|
||||
txCoinbase.vout[0].scriptPubKey = CScript();
|
||||
pblock->vtx[0] = CTransaction(txCoinbase);
|
||||
if (txFirst.size() < 2)
|
||||
txFirst.push_back(new CTransaction(pblock->vtx[0]));
|
||||
pblock->hashMerkleRoot = pblock->BuildMerkleTree();
|
||||
pblock->nNonce = blockinfo[i].nonce;
|
||||
pblock->nNonce = nonces[i];
|
||||
/*bool fFound = false;
|
||||
for (int j = 0; !fFound; j++)
|
||||
{
|
||||
pblock->nNonce = j;
|
||||
if (CheckProofOfWork(pblock->GetHash(), pblock->nBits, Params().GetConsensus()))
|
||||
{
|
||||
fFound = true;
|
||||
std::cout << pblock->nNonce << ",";
|
||||
if ((i + 1) % 10 == 0)
|
||||
std::cout << std::endl;
|
||||
else
|
||||
std::cout << " ";
|
||||
}
|
||||
}*/
|
||||
CValidationState state;
|
||||
BOOST_CHECK(ProcessNewBlock(state, NULL, pblock, true, NULL));
|
||||
BOOST_CHECK(state.IsValid());
|
||||
@@ -204,10 +267,10 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
|
||||
|
||||
// subsidy changing
|
||||
int nHeight = chainActive.Height();
|
||||
chainActive.Tip()->nHeight = 209999;
|
||||
chainActive.Tip()->nHeight = 2099999;
|
||||
BOOST_CHECK(pblocktemplate = CreateNewBlock(scriptPubKey));
|
||||
delete pblocktemplate;
|
||||
chainActive.Tip()->nHeight = 210000;
|
||||
chainActive.Tip()->nHeight = 2100000;
|
||||
BOOST_CHECK(pblocktemplate = CreateNewBlock(scriptPubKey));
|
||||
delete pblocktemplate;
|
||||
chainActive.Tip()->nHeight = nHeight;
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -13,8 +13,9 @@ using namespace std;
|
||||
|
||||
BOOST_FIXTURE_TEST_SUITE(pow_tests, BasicTestingSetup)
|
||||
|
||||
// TODO: put this check back in with the correct value
|
||||
/* Test calculation of next difficulty target with no constraints applying */
|
||||
BOOST_AUTO_TEST_CASE(get_next_work)
|
||||
/*BOOST_AUTO_TEST_CASE(get_next_work)
|
||||
{
|
||||
SelectParams(CBaseChainParams::MAIN);
|
||||
const Consensus::Params& params = Params().GetConsensus();
|
||||
@@ -26,8 +27,11 @@ BOOST_AUTO_TEST_CASE(get_next_work)
|
||||
pindexLast.nBits = 0x1d00ffff;
|
||||
BOOST_CHECK_EQUAL(CalculateNextWorkRequired(&pindexLast, nLastRetargetTime, params), 0x1d00d86a);
|
||||
}
|
||||
*/
|
||||
|
||||
// TODO: put this check back in with the correct value
|
||||
/* Test the constraint on the upper bound for next work */
|
||||
/*
|
||||
BOOST_AUTO_TEST_CASE(get_next_work_pow_limit)
|
||||
{
|
||||
SelectParams(CBaseChainParams::MAIN);
|
||||
@@ -40,9 +44,11 @@ BOOST_AUTO_TEST_CASE(get_next_work_pow_limit)
|
||||
pindexLast.nBits = 0x1d00ffff;
|
||||
BOOST_CHECK_EQUAL(CalculateNextWorkRequired(&pindexLast, nLastRetargetTime, params), 0x1d00ffff);
|
||||
}
|
||||
*/
|
||||
|
||||
// TODO: put this check back in with the correct value
|
||||
/* Test the constraint on the lower bound for actual time taken */
|
||||
BOOST_AUTO_TEST_CASE(get_next_work_lower_limit_actual)
|
||||
/*BOOST_AUTO_TEST_CASE(get_next_work_lower_limit_actual)
|
||||
{
|
||||
SelectParams(CBaseChainParams::MAIN);
|
||||
const Consensus::Params& params = Params().GetConsensus();
|
||||
@@ -54,6 +60,7 @@ BOOST_AUTO_TEST_CASE(get_next_work_lower_limit_actual)
|
||||
pindexLast.nBits = 0x1c05a3f4;
|
||||
BOOST_CHECK_EQUAL(CalculateNextWorkRequired(&pindexLast, nLastRetargetTime, params), 0x1c0168fd);
|
||||
}
|
||||
*/
|
||||
|
||||
/* Test the constraint on the upper bound for actual time taken */
|
||||
BOOST_AUTO_TEST_CASE(get_next_work_upper_limit_actual)
|
||||
|
||||
@@ -951,6 +951,49 @@ BOOST_AUTO_TEST_CASE(script_combineSigs)
|
||||
BOOST_CHECK(combined == partial3c);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(script_nccScript)
|
||||
{
|
||||
// Test the NCC scripts
|
||||
// Outline:
|
||||
// Spend normal tx to make NCC claim
|
||||
// Spend NCC claim to update NCC claim
|
||||
// Spend NCC updated claim to abandon name
|
||||
CBasicKeyStore keystore;
|
||||
vector<CKey> keys;
|
||||
vector<CPubKey> pubkeys;
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
CKey key;
|
||||
key.MakeNewKey(false);
|
||||
keys.push_back(key);
|
||||
pubkeys.push_back(key.GetPubKey());
|
||||
keystore.AddKey(key);
|
||||
}
|
||||
|
||||
string sName = "testname";
|
||||
string sValue = "testvalue";
|
||||
std::vector<unsigned char> vchName(sName.begin(), sName.end());
|
||||
std::vector<unsigned char> vchValue(sValue.begin(), sValue.end());
|
||||
|
||||
CMutableTransaction txOrig = BuildCreditingTransaction(GetScriptForDestination(keys[0].GetPubKey().GetID()));
|
||||
|
||||
CMutableTransaction txNCC0 = BuildSpendingTransaction(CScript(), txOrig);
|
||||
CScript txNCCOut0 = CScript() << OP_CLAIM_NAME << vchName << vchValue << OP_2DROP << OP_DROP;
|
||||
txNCCOut0 = txNCCOut0 + GetScriptForDestination(keys[1].GetPubKey().GetID());
|
||||
txNCC0.vout[0].scriptPubKey = txNCCOut0;
|
||||
SignSignature(keystore, txOrig, txNCC0, 0);
|
||||
|
||||
CMutableTransaction txNCC1 = BuildSpendingTransaction(CScript(), txNCC0);
|
||||
CScript txNCCOut1 = CScript() << OP_CLAIM_NAME << vchName << vchValue << OP_2DROP << OP_DROP;
|
||||
txNCCOut1 = txNCCOut1 + GetScriptForDestination(keys[2].GetPubKey().GetID());
|
||||
txNCC1.vout[0].scriptPubKey = txNCCOut1;
|
||||
SignSignature(keystore, txNCC0, txNCC1, 0);
|
||||
|
||||
CMutableTransaction txFinal = BuildSpendingTransaction(CScript(), txNCC1);
|
||||
txFinal.vout[0].scriptPubKey = GetScriptForDestination(keys[3].GetPubKey().GetID());
|
||||
SignSignature(keystore, txNCC1, txFinal, 0);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(script_standard_push)
|
||||
{
|
||||
ScriptError err;
|
||||
|
||||
@@ -52,6 +52,7 @@ TestingSetup::TestingSetup()
|
||||
pblocktree = new CBlockTreeDB(1 << 20, true);
|
||||
pcoinsdbview = new CCoinsViewDB(1 << 23, true);
|
||||
pcoinsTip = new CCoinsViewCache(pcoinsdbview);
|
||||
pnccTrie = new CNCCTrie(true);
|
||||
InitBlockIndex();
|
||||
#ifdef ENABLE_WALLET
|
||||
bool fFirstRun;
|
||||
@@ -76,6 +77,7 @@ TestingSetup::~TestingSetup()
|
||||
pwalletMain = NULL;
|
||||
#endif
|
||||
UnloadBlockIndex();
|
||||
delete pnccTrie;
|
||||
delete pcoinsTip;
|
||||
delete pcoinsdbview;
|
||||
delete pblocktree;
|
||||
|
||||
@@ -339,8 +339,8 @@ BOOST_AUTO_TEST_CASE(test_IsStandard)
|
||||
string reason;
|
||||
BOOST_CHECK(IsStandardTx(t, reason));
|
||||
|
||||
t.vout[0].nValue = 501; // dust
|
||||
BOOST_CHECK(!IsStandardTx(t, reason));
|
||||
//t.vout[0].nValue = 501; // dust
|
||||
//BOOST_CHECK(!IsStandardTx(t, reason));
|
||||
|
||||
t.vout[0].nValue = 601; // not dust
|
||||
BOOST_CHECK(IsStandardTx(t, reason));
|
||||
@@ -374,6 +374,18 @@ BOOST_AUTO_TEST_CASE(test_IsStandard)
|
||||
t.vout[0].scriptPubKey = CScript() << OP_RETURN;
|
||||
t.vout[1].scriptPubKey = CScript() << OP_RETURN;
|
||||
BOOST_CHECK(!IsStandardTx(t, reason));
|
||||
|
||||
// NCC transactions
|
||||
|
||||
t.vout.resize(1);
|
||||
string sName = "testname";
|
||||
string sValue = "testvalue";
|
||||
std::vector<unsigned char> vchName (sName.begin(), sName.end());
|
||||
std::vector<unsigned char> vchValue (sValue.begin(), sValue.end());
|
||||
CScript scriptPubKey = CScript() << OP_CLAIM_NAME << vchName << vchValue << OP_2DROP << OP_DROP;
|
||||
t.vout[0].scriptPubKey = scriptPubKey + GetScriptForDestination(key.GetPubKey().GetID());
|
||||
t.vout[0].nValue = 10*COIN;
|
||||
BOOST_CHECK(IsStandardTx(t, reason));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
+1
-1
@@ -95,7 +95,7 @@ void AddTimeData(const CNetAddr& ip, int64_t nOffsetSample)
|
||||
if (!fMatch)
|
||||
{
|
||||
fDone = true;
|
||||
string strMessage = _("Warning: Please check that your computer's date and time are correct! If your clock is wrong Bitcoin Core will not work properly.");
|
||||
string strMessage = _("Warning: Please check that your computer's date and time are correct! If your clock is wrong LBRYcrd Core will not work properly.");
|
||||
strMiscWarning = strMessage;
|
||||
LogPrintf("*** %s\n", strMessage);
|
||||
uiInterface.ThreadSafeMessageBox(strMessage, "", CClientUIInterface::MSG_WARNING);
|
||||
|
||||
@@ -219,6 +219,7 @@ bool CBlockTreeDB::LoadBlockIndexGuts()
|
||||
pindexNew->nUndoPos = diskindex.nUndoPos;
|
||||
pindexNew->nVersion = diskindex.nVersion;
|
||||
pindexNew->hashMerkleRoot = diskindex.hashMerkleRoot;
|
||||
pindexNew->hashNCCTrie = diskindex.hashNCCTrie;
|
||||
pindexNew->nTime = diskindex.nTime;
|
||||
pindexNew->nBits = diskindex.nBits;
|
||||
pindexNew->nNonce = diskindex.nNonce;
|
||||
|
||||
+21
-10
@@ -7,6 +7,7 @@
|
||||
#define BITCOIN_UNDO_H
|
||||
|
||||
#include "compressor.h"
|
||||
#include "ncctrie.h"
|
||||
#include "primitives/transaction.h"
|
||||
#include "serialize.h"
|
||||
|
||||
@@ -20,36 +21,42 @@ class CTxInUndo
|
||||
{
|
||||
public:
|
||||
CTxOut txout; // the txout data before being spent
|
||||
bool fLastUnspent; // whether the outpoint was the last unspent
|
||||
bool fCoinBase; // if the outpoint was the last unspent: whether it belonged to a coinbase
|
||||
unsigned int nHeight; // if the outpoint was the last unspent: its height
|
||||
int nVersion; // if the outpoint was the last unspent: its version
|
||||
unsigned int nNCCValidHeight; // If the outpoint was an NCC claim, the height at which the claim should be inserted into the trie
|
||||
|
||||
CTxInUndo() : txout(), fCoinBase(false), nHeight(0), nVersion(0) {}
|
||||
CTxInUndo(const CTxOut &txoutIn, bool fCoinBaseIn = false, unsigned int nHeightIn = 0, int nVersionIn = 0) : txout(txoutIn), fCoinBase(fCoinBaseIn), nHeight(nHeightIn), nVersion(nVersionIn) { }
|
||||
CTxInUndo() : txout(), fLastUnspent(false), fCoinBase(false), nHeight(0), nVersion(0), nNCCValidHeight(0) {}
|
||||
CTxInUndo(const CTxOut &txoutIn, bool fLastUnspent = false, bool fCoinBaseIn = false, unsigned int nHeightIn = 0, int nVersionIn = 0, unsigned int nNCCValidHeight = 0) : txout(txoutIn), fLastUnspent(fLastUnspent), fCoinBase(fCoinBaseIn), nHeight(nHeightIn), nVersion(nVersionIn), nNCCValidHeight(nNCCValidHeight) { }
|
||||
|
||||
unsigned int GetSerializeSize(int nType, int nVersion) const {
|
||||
return ::GetSerializeSize(VARINT(nHeight*2+(fCoinBase ? 1 : 0)), nType, nVersion) +
|
||||
(nHeight > 0 ? ::GetSerializeSize(VARINT(this->nVersion), nType, nVersion) : 0) +
|
||||
::GetSerializeSize(CTxOutCompressor(REF(txout)), nType, nVersion);
|
||||
return ::GetSerializeSize(VARINT(nHeight*4+(fCoinBase ? 2 : 0)+(fLastUnspent ? 1: 0)), nType, nVersion) +
|
||||
(fLastUnspent ? ::GetSerializeSize(VARINT(this->nVersion), nType, nVersion) : 0) +
|
||||
::GetSerializeSize(CTxOutCompressor(REF(txout)), nType, nVersion) +
|
||||
::GetSerializeSize(VARINT(nNCCValidHeight), nType, nVersion);
|
||||
}
|
||||
|
||||
template<typename Stream>
|
||||
void Serialize(Stream &s, int nType, int nVersion) const {
|
||||
::Serialize(s, VARINT(nHeight*2+(fCoinBase ? 1 : 0)), nType, nVersion);
|
||||
if (nHeight > 0)
|
||||
::Serialize(s, VARINT(nHeight*4+(fCoinBase ? 2 : 0)+(fLastUnspent ? 1: 0)), nType, nVersion);
|
||||
if (fLastUnspent)
|
||||
::Serialize(s, VARINT(this->nVersion), nType, nVersion);
|
||||
::Serialize(s, CTxOutCompressor(REF(txout)), nType, nVersion);
|
||||
::Serialize(s, VARINT(nNCCValidHeight), nType, nVersion);
|
||||
}
|
||||
|
||||
template<typename Stream>
|
||||
void Unserialize(Stream &s, int nType, int nVersion) {
|
||||
unsigned int nCode = 0;
|
||||
::Unserialize(s, VARINT(nCode), nType, nVersion);
|
||||
nHeight = nCode / 2;
|
||||
fCoinBase = nCode & 1;
|
||||
if (nHeight > 0)
|
||||
nHeight = nCode / 4;
|
||||
fCoinBase = nCode & 2;
|
||||
fLastUnspent = nCode & 1;
|
||||
if (fLastUnspent)
|
||||
::Unserialize(s, VARINT(this->nVersion), nType, nVersion);
|
||||
::Unserialize(s, REF(CTxOutCompressor(REF(txout))), nType, nVersion);
|
||||
::Unserialize(s, VARINT(nNCCValidHeight), nType, nVersion);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -73,12 +80,16 @@ class CBlockUndo
|
||||
{
|
||||
public:
|
||||
std::vector<CTxUndo> vtxundo; // for all but the coinbase
|
||||
CNCCTrieQueueUndo insertUndo; // any claims that went from the queue to the trie
|
||||
CNCCTrieQueueUndo expireUndo; // any claims that expired
|
||||
|
||||
ADD_SERIALIZE_METHODS;
|
||||
|
||||
template <typename Stream, typename Operation>
|
||||
inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
|
||||
READWRITE(vtxundo);
|
||||
READWRITE(insertUndo);
|
||||
READWRITE(expireUndo);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+7
-7
@@ -374,7 +374,7 @@ static std::string FormatException(const std::exception* pex, const char* pszThr
|
||||
char pszModule[MAX_PATH] = "";
|
||||
GetModuleFileNameA(NULL, pszModule, sizeof(pszModule));
|
||||
#else
|
||||
const char* pszModule = "bitcoin";
|
||||
const char* pszModule = "lbrycrd";
|
||||
#endif
|
||||
if (pex)
|
||||
return strprintf(
|
||||
@@ -398,10 +398,10 @@ boost::filesystem::path GetDefaultDataDir()
|
||||
// Windows < Vista: C:\Documents and Settings\Username\Application Data\Bitcoin
|
||||
// Windows >= Vista: C:\Users\Username\AppData\Roaming\Bitcoin
|
||||
// Mac: ~/Library/Application Support/Bitcoin
|
||||
// Unix: ~/.bitcoin
|
||||
// Unix: ~/.lbrycrd
|
||||
#ifdef WIN32
|
||||
// Windows
|
||||
return GetSpecialFolderPath(CSIDL_APPDATA) / "Bitcoin";
|
||||
return GetSpecialFolderPath(CSIDL_APPDATA) / "lbrycrd";
|
||||
#else
|
||||
fs::path pathRet;
|
||||
char* pszHome = getenv("HOME");
|
||||
@@ -413,10 +413,10 @@ boost::filesystem::path GetDefaultDataDir()
|
||||
// Mac
|
||||
pathRet /= "Library/Application Support";
|
||||
TryCreateDirectory(pathRet);
|
||||
return pathRet / "Bitcoin";
|
||||
return pathRet / "lbrycrd";
|
||||
#else
|
||||
// Unix
|
||||
return pathRet / ".bitcoin";
|
||||
return pathRet / ".lbrycrd";
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
@@ -463,7 +463,7 @@ void ClearDatadirCache()
|
||||
|
||||
boost::filesystem::path GetConfigFile()
|
||||
{
|
||||
boost::filesystem::path pathConfigFile(GetArg("-conf", "bitcoin.conf"));
|
||||
boost::filesystem::path pathConfigFile(GetArg("-conf", "lbrycrd.conf"));
|
||||
if (!pathConfigFile.is_complete())
|
||||
pathConfigFile = GetDataDir(false) / pathConfigFile;
|
||||
|
||||
@@ -499,7 +499,7 @@ void ReadConfigFile(map<string, string>& mapSettingsRet,
|
||||
#ifndef WIN32
|
||||
boost::filesystem::path GetPidFile()
|
||||
{
|
||||
boost::filesystem::path pathPidFile(GetArg("-pid", "bitcoind.pid"));
|
||||
boost::filesystem::path pathPidFile(GetArg("-pid", "lbrycrdd.pid"));
|
||||
if (!pathPidFile.is_complete()) pathPidFile = GetDataDir() / pathPidFile;
|
||||
return pathPidFile;
|
||||
}
|
||||
|
||||
@@ -76,10 +76,10 @@ UniValue importprivkey(const UniValue& params, bool fHelp)
|
||||
|
||||
if (fHelp || params.size() < 1 || params.size() > 3)
|
||||
throw runtime_error(
|
||||
"importprivkey \"bitcoinprivkey\" ( \"label\" rescan )\n"
|
||||
"importprivkey \"lbrycrdprivkey\" ( \"label\" rescan )\n"
|
||||
"\nAdds a private key (as returned by dumpprivkey) to your wallet.\n"
|
||||
"\nArguments:\n"
|
||||
"1. \"bitcoinprivkey\" (string, required) The private key (see dumpprivkey)\n"
|
||||
"1. \"lbrycrdprivkey\" (string, required) The private key (see dumpprivkey)\n"
|
||||
"2. \"label\" (string, optional, default=\"\") An optional label\n"
|
||||
"3. rescan (boolean, optional, default=true) Rescan the wallet for transactions\n"
|
||||
"\nNote: This call can take minutes to complete if rescan is true.\n"
|
||||
@@ -183,7 +183,7 @@ UniValue importaddress(const UniValue& params, bool fHelp)
|
||||
std::vector<unsigned char> data(ParseHex(params[0].get_str()));
|
||||
script = CScript(data.begin(), data.end());
|
||||
} else {
|
||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address or script");
|
||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid lbrycrd address or script");
|
||||
}
|
||||
|
||||
string strLabel = "";
|
||||
@@ -336,11 +336,11 @@ UniValue dumpprivkey(const UniValue& params, bool fHelp)
|
||||
|
||||
if (fHelp || params.size() != 1)
|
||||
throw runtime_error(
|
||||
"dumpprivkey \"bitcoinaddress\"\n"
|
||||
"\nReveals the private key corresponding to 'bitcoinaddress'.\n"
|
||||
"dumpprivkey \"lbrycrdaddress\"\n"
|
||||
"\nReveals the private key corresponding to 'lbrycrdaddress'.\n"
|
||||
"Then the importprivkey can be used with this output\n"
|
||||
"\nArguments:\n"
|
||||
"1. \"bitcoinaddress\" (string, required) The bitcoin address for the private key\n"
|
||||
"1. \"lbrycrdaddress\" (string, required) The lbrycrd address for the private key\n"
|
||||
"\nResult:\n"
|
||||
"\"key\" (string) The private key\n"
|
||||
"\nExamples:\n"
|
||||
@@ -356,7 +356,7 @@ UniValue dumpprivkey(const UniValue& params, bool fHelp)
|
||||
string strAddress = params[0].get_str();
|
||||
CBitcoinAddress address;
|
||||
if (!address.SetString(strAddress))
|
||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address");
|
||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid lbrycrd address");
|
||||
CKeyID keyID;
|
||||
if (!address.GetKeyID(keyID))
|
||||
throw JSONRPCError(RPC_TYPE_ERROR, "Address does not refer to a key");
|
||||
@@ -406,7 +406,7 @@ UniValue dumpwallet(const UniValue& params, bool fHelp)
|
||||
std::sort(vKeyBirth.begin(), vKeyBirth.end());
|
||||
|
||||
// produce output
|
||||
file << strprintf("# Wallet dump created by Bitcoin %s (%s)\n", CLIENT_BUILD, CLIENT_DATE);
|
||||
file << strprintf("# Wallet dump created by LBRYcrd %s (%s)\n", CLIENT_BUILD, CLIENT_DATE);
|
||||
file << strprintf("# * Created on %s\n", EncodeDumpTime(GetTime()));
|
||||
file << strprintf("# * Best block at time of backup was %i (%s),\n", chainActive.Height(), chainActive.Tip()->GetBlockHash().ToString());
|
||||
file << strprintf("# mined on %s\n", EncodeDumpTime(chainActive.Tip()->GetBlockTime()));
|
||||
|
||||
+481
-54
@@ -16,6 +16,7 @@
|
||||
#include "utilmoneystr.h"
|
||||
#include "wallet.h"
|
||||
#include "walletdb.h"
|
||||
#include "ncc.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -99,7 +100,7 @@ UniValue getnewaddress(const UniValue& params, bool fHelp)
|
||||
"\nArguments:\n"
|
||||
"1. \"account\" (string, optional) DEPRECATED. The account name for the address to be linked to. If not provided, the default account \"\" is used. It can also be set to the empty string \"\" to represent the default account. The account does not need to exist, it will be created if there is no account by the given name.\n"
|
||||
"\nResult:\n"
|
||||
"\"bitcoinaddress\" (string) The new bitcoin address\n"
|
||||
"\"lbrycrdaddress\" (string) The new lbrycrd address\n"
|
||||
"\nExamples:\n"
|
||||
+ HelpExampleCli("getnewaddress", "")
|
||||
+ HelpExampleRpc("getnewaddress", "")
|
||||
@@ -176,7 +177,7 @@ UniValue getaccountaddress(const UniValue& params, bool fHelp)
|
||||
"\nArguments:\n"
|
||||
"1. \"account\" (string, required) The account name for the address. It can also be set to the empty string \"\" to represent the default account. The account does not need to exist, it will be created and a new address created if there is no account by the given name.\n"
|
||||
"\nResult:\n"
|
||||
"\"bitcoinaddress\" (string) The account bitcoin address\n"
|
||||
"\"lbrycrdaddress\" (string) The account lbrycrd address\n"
|
||||
"\nExamples:\n"
|
||||
+ HelpExampleCli("getaccountaddress", "")
|
||||
+ HelpExampleCli("getaccountaddress", "\"\"")
|
||||
@@ -238,10 +239,10 @@ UniValue setaccount(const UniValue& params, bool fHelp)
|
||||
|
||||
if (fHelp || params.size() < 1 || params.size() > 2)
|
||||
throw runtime_error(
|
||||
"setaccount \"bitcoinaddress\" \"account\"\n"
|
||||
"setaccount \"lbrycrdaddress\" \"account\"\n"
|
||||
"\nDEPRECATED. Sets the account associated with the given address.\n"
|
||||
"\nArguments:\n"
|
||||
"1. \"bitcoinaddress\" (string, required) The bitcoin address to be associated with an account.\n"
|
||||
"1. \"lbrycrdaddress\" (string, required) The lbrycrd address to be associated with an account.\n"
|
||||
"2. \"account\" (string, required) The account to assign the address to.\n"
|
||||
"\nExamples:\n"
|
||||
+ HelpExampleCli("setaccount", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" \"tabby\"")
|
||||
@@ -284,10 +285,10 @@ UniValue getaccount(const UniValue& params, bool fHelp)
|
||||
|
||||
if (fHelp || params.size() != 1)
|
||||
throw runtime_error(
|
||||
"getaccount \"bitcoinaddress\"\n"
|
||||
"getaccount \"lbrycrdaddress\"\n"
|
||||
"\nDEPRECATED. Returns the account associated with the given address.\n"
|
||||
"\nArguments:\n"
|
||||
"1. \"bitcoinaddress\" (string, required) The bitcoin address for account lookup.\n"
|
||||
"1. \"lbrycrdaddress\" (string, required) The lbrycrd address for account lookup.\n"
|
||||
"\nResult:\n"
|
||||
"\"accountname\" (string) the account address\n"
|
||||
"\nExamples:\n"
|
||||
@@ -322,7 +323,7 @@ UniValue getaddressesbyaccount(const UniValue& params, bool fHelp)
|
||||
"1. \"account\" (string, required) The account name.\n"
|
||||
"\nResult:\n"
|
||||
"[ (json array of string)\n"
|
||||
" \"bitcoinaddress\" (string) a bitcoin address associated with the given account\n"
|
||||
" \"lbrycrdaddress\" (string) a lbrycrd address associated with the given account\n"
|
||||
" ,...\n"
|
||||
"]\n"
|
||||
"\nExamples:\n"
|
||||
@@ -346,6 +347,432 @@ UniValue getaddressesbyaccount(const UniValue& params, bool fHelp)
|
||||
return ret;
|
||||
}
|
||||
|
||||
void ClaimName(const std::vector<unsigned char> vchName, const std::vector<unsigned char> vchValue, CAmount nAmount, CWalletTx& wtxNew)
|
||||
{
|
||||
// Check amount
|
||||
if (nAmount <= 0)
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid amount");
|
||||
|
||||
if (nAmount > pwalletMain->GetBalance())
|
||||
throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Insufficient funds");
|
||||
|
||||
string strError;
|
||||
if (pwalletMain->IsLocked())
|
||||
{
|
||||
strError = "Error: Wallet locked, unable to create transaction!";
|
||||
LogPrintf("SendMoney() : %s", strError);
|
||||
throw JSONRPCError(RPC_WALLET_ERROR, strError);
|
||||
}
|
||||
|
||||
//Get new address
|
||||
CPubKey newKey;
|
||||
if (!pwalletMain->GetKeyFromPool(newKey))
|
||||
throw JSONRPCError(RPC_WALLET_KEYPOOL_RAN_OUT, "Error: Keypool ran out, please call keypoolrefill first");
|
||||
|
||||
CScript scriptPubKey = GetScriptForDestination(CTxDestination(newKey.GetID()));
|
||||
CScript claimScript = CScript() << OP_CLAIM_NAME << vchName << vchValue << OP_2DROP << OP_DROP;
|
||||
claimScript = claimScript + scriptPubKey;
|
||||
|
||||
vector<CRecipient> vecSend;
|
||||
int nChangePosRet = -1;
|
||||
|
||||
CRecipient recipient = {claimScript, nAmount, false};
|
||||
vecSend.push_back(recipient);
|
||||
|
||||
CReserveKey reservekey(pwalletMain);
|
||||
CAmount nFeeRequired;
|
||||
if (!pwalletMain->CreateTransaction(vecSend, wtxNew, reservekey, nFeeRequired, nChangePosRet, strError))
|
||||
{
|
||||
if (nAmount + nFeeRequired > pwalletMain->GetBalance())
|
||||
strError = strprintf("Error: This transaction requires a transaction fee of at least %s because if its amount, complexity, or use of recently received funds!", FormatMoney(nFeeRequired));
|
||||
LogPrintf("ClaimName() : %s\n", strError);
|
||||
throw JSONRPCError(RPC_WALLET_ERROR, strError);
|
||||
}
|
||||
if (!pwalletMain->CommitTransaction(wtxNew, reservekey))
|
||||
throw JSONRPCError(RPC_WALLET_ERROR, "Error: The transaction was rejected! This might hapen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.");
|
||||
}
|
||||
|
||||
UniValue claimname(const UniValue& params, bool fHelp)
|
||||
{
|
||||
if (!EnsureWalletIsAvailable(fHelp))
|
||||
return NullUniValue;
|
||||
|
||||
if (fHelp || params.size() != 3)
|
||||
throw runtime_error(
|
||||
"claimname \"name\" \"value\" amount\n"
|
||||
"\nCreate a transaction which issues a claim assigning a value to a name. The claim will be authoritative if the transaction amount is greater than the transaction amount of all other unspent transactions which issue a claim over the same name, and it will remain authoritative as long as it remains unspent and there are no other greater unspent transactions issuing a claim over the same name. The amount is a real and is rounded to the nearest 0.00000001\n"
|
||||
+ HelpRequiringPassphrase() +
|
||||
"\nArguments:\n"
|
||||
"1. \"name\" (string, required) The name to be assigned the value.\n"
|
||||
"2. \"value\" (string, required) The value to assign to the name.\n"
|
||||
"3. \"amount\" (numeric, required) The amount in LBRYcrd to send. eg 0.1\n"
|
||||
"\nResult:\n"
|
||||
"\"transactionid\" (string) The transaction id.\n"
|
||||
);
|
||||
string sName = params[0].get_str();
|
||||
string sValue = params[1].get_str();
|
||||
std::vector<unsigned char> vchName (sName.begin(), sName.end());
|
||||
std::vector<unsigned char> vchValue (sValue.begin(), sValue.end());
|
||||
CAmount nAmount = AmountFromValue(params[2]);
|
||||
|
||||
CWalletTx wtx;
|
||||
|
||||
EnsureWalletIsUnlocked();
|
||||
|
||||
ClaimName(vchName, vchValue, nAmount, wtx);
|
||||
|
||||
return wtx.GetHash().GetHex();
|
||||
}
|
||||
|
||||
|
||||
void UpdateName(const std::vector<unsigned char> vchName, const std::vector<unsigned char> vchValue, CAmount nAmount, CWalletTx& wtxNew, CWalletTx wtxIn, unsigned int nTxOut)
|
||||
{
|
||||
// Check amount
|
||||
if (nAmount <= 0)
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid amount");
|
||||
|
||||
if (nAmount - wtxIn.vout[nTxOut].nValue > pwalletMain->GetBalance())
|
||||
throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Insufficient funds");
|
||||
|
||||
string strError;
|
||||
if (pwalletMain->IsLocked())
|
||||
{
|
||||
strError = "Error: Wallet locked, unable to create transaction!";
|
||||
LogPrintf("UpdateName() : %s", strError);
|
||||
throw JSONRPCError(RPC_WALLET_ERROR, strError);
|
||||
}
|
||||
|
||||
//Get new address
|
||||
CPubKey newKey;
|
||||
if (!pwalletMain->GetKeyFromPool(newKey))
|
||||
throw JSONRPCError(RPC_WALLET_KEYPOOL_RAN_OUT, "Error: Keypool ran out, please call keypoolrefill first");
|
||||
|
||||
CScript scriptPubKey = GetScriptForDestination(CTxDestination(newKey.GetID()));
|
||||
CScript claimScript = CScript() << OP_CLAIM_NAME << vchName << vchValue << OP_2DROP << OP_DROP;
|
||||
claimScript = claimScript + scriptPubKey;
|
||||
|
||||
vector<CRecipient> vecSend;
|
||||
int nChangePosRet = -1;
|
||||
|
||||
CRecipient recipient = {claimScript, nAmount, false};
|
||||
vecSend.push_back(recipient);
|
||||
|
||||
CReserveKey reservekey(pwalletMain);
|
||||
CAmount nFeeRequired;
|
||||
if (!pwalletMain->CreateTransaction(vecSend, wtxNew, reservekey, nFeeRequired, nChangePosRet, strError, NULL, &wtxIn, nTxOut))
|
||||
{
|
||||
if (nAmount + nFeeRequired - wtxIn.vout[nTxOut].nValue > pwalletMain->GetBalance())
|
||||
strError = strprintf("Error: This transaction requires a transaction fee of at leaste %s because of its amount, complexity, or use of recently received funds!", FormatMoney(nFeeRequired));
|
||||
LogPrintf("ClaimName() : %s\n", strError);
|
||||
throw JSONRPCError(RPC_WALLET_ERROR, strError);
|
||||
}
|
||||
if (!pwalletMain->CommitTransaction(wtxNew, reservekey))
|
||||
throw JSONRPCError(RPC_WALLET_ERROR, "Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.");
|
||||
}
|
||||
|
||||
|
||||
UniValue updatename(const UniValue& params, bool fHelp)
|
||||
{
|
||||
if (!EnsureWalletIsAvailable(fHelp))
|
||||
return NullUniValue;
|
||||
|
||||
if (fHelp || params.size() != 3)
|
||||
throw runtime_error(
|
||||
"updatename \"txid\" \"value\" amount\n"
|
||||
"Create a transaction which issues a claim assigning a value to a name, spending the previous txout which issued a claim over the same name and therefore superseding that claim. The claim will be authoritative if the transaction amount is greater than the transaction amount of all other unspent transactions which issue a claim over the same name, and it will remain authoritative as long as it remains unspent and there are no greater unspent transactions issuing a claim over the same name.\n"
|
||||
+ HelpRequiringPassphrase() +
|
||||
"\nArguments:\n"
|
||||
"1. \"txid\" (string, required) The transaction containing the unspent txout which should be spent.\n"
|
||||
"2. \"value\" (string, required) The value to assign to the name.\n"
|
||||
"3. \"amount\" (numeric, required) The amount in LBRYcrd to send. eg 0.1\n"
|
||||
"\nResult:\n"
|
||||
"\"transactionid\" (string) The new transaction id.\n"
|
||||
);
|
||||
|
||||
uint256 hash;
|
||||
hash.SetHex(params[0].get_str());
|
||||
|
||||
std::vector<unsigned char> vchName;
|
||||
string sValue = params[1].get_str();
|
||||
std::vector<unsigned char> vchValue (sValue.begin(), sValue.end());
|
||||
CAmount nAmount = AmountFromValue(params[2]);
|
||||
|
||||
isminefilter filter = ISMINE_NCC;
|
||||
|
||||
UniValue entry;
|
||||
if (!pwalletMain->mapWallet.count(hash))
|
||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid or non-wallet transaction id");
|
||||
|
||||
const CWalletTx& wtx = pwalletMain->mapWallet[hash];
|
||||
int op;
|
||||
std::vector<std::vector<unsigned char> > vvchParams;
|
||||
CWalletTx wtxNew;
|
||||
bool fFound = false;
|
||||
for (unsigned int i = 0; !fFound && i < wtx.vout.size(); i++)
|
||||
{
|
||||
if ((filter & pwalletMain->IsMine(wtx.vout[i])))
|
||||
{
|
||||
if (DecodeNCCScript(wtx.vout[i].scriptPubKey, op, vvchParams))
|
||||
{
|
||||
vchName = vvchParams[0];
|
||||
EnsureWalletIsUnlocked();
|
||||
UpdateName(vchName, vchValue, nAmount, wtxNew, wtx, i);
|
||||
fFound = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!fFound)
|
||||
throw runtime_error("Error: The given transaction contains no NCC scripts owned by this wallet");
|
||||
return wtxNew.GetHash().GetHex();
|
||||
}
|
||||
|
||||
|
||||
void AbandonName(const CTxDestination &address, CAmount nAmount, CWalletTx& wtxNew, CWalletTx wtxIn, unsigned int nTxOut)
|
||||
{
|
||||
// Check amount
|
||||
if (nAmount <= 0)
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid amount");
|
||||
|
||||
if (nAmount - wtxIn.vout[nTxOut].nValue > pwalletMain->GetBalance())
|
||||
throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Insufficient funds");
|
||||
|
||||
string strError;
|
||||
if (pwalletMain->IsLocked())
|
||||
{
|
||||
strError = "Error: Wallet locked, unable to create transaction!";
|
||||
LogPrintf("AbandonName() : %s", strError);
|
||||
throw JSONRPCError(RPC_WALLET_ERROR, strError);
|
||||
}
|
||||
|
||||
CScript scriptPubKey = GetScriptForDestination(address);
|
||||
|
||||
vector<CRecipient> vecSend;
|
||||
int nChangePosRet = -1;
|
||||
|
||||
CRecipient recipient = {scriptPubKey, nAmount, false};
|
||||
vecSend.push_back(recipient);
|
||||
|
||||
CReserveKey reservekey(pwalletMain);
|
||||
CAmount nFeeRequired;
|
||||
if (!pwalletMain->CreateTransaction(vecSend, wtxNew, reservekey, nFeeRequired, nChangePosRet, strError, NULL, &wtxIn, nTxOut))
|
||||
{
|
||||
if (nAmount + nFeeRequired - wtxIn.vout[nTxOut].nValue > pwalletMain->GetBalance())
|
||||
strError = strprintf("Error: This transaction requires a transaction fee of a least %s because of its amount, complexity, or use of recently received funds!", FormatMoney(nFeeRequired));
|
||||
LogPrintf("AbandonName() : %s\n", strError);
|
||||
throw JSONRPCError(RPC_WALLET_ERROR, strError);
|
||||
}
|
||||
if (!pwalletMain->CommitTransaction(wtxNew, reservekey))
|
||||
throw JSONRPCError(RPC_WALLET_ERROR, "Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of a wallet.dat and coins were spent in the copy but not marked as spent here.");
|
||||
}
|
||||
|
||||
UniValue abandonname(const UniValue& params, bool fHelp)
|
||||
{
|
||||
if (!EnsureWalletIsAvailable(fHelp))
|
||||
return NullUniValue;
|
||||
|
||||
if (fHelp || params.size() != 3)
|
||||
throw runtime_error(
|
||||
"abandonname \"txid\" \"lbrycrdaddress\" \"amount\"\n"
|
||||
"Create a transaction which spends a txout which assigned a value to a name, effectively abandoning that claim.\n"
|
||||
+ HelpRequiringPassphrase() +
|
||||
"\nArguments:\n"
|
||||
"1. \"txid\" (string, required) The transaction containing the unspent txout which should be spent.\n"
|
||||
"2. \"lbrycrdaddress\" (string, required) The lbrycrd address to send to.\n"
|
||||
"3. \"amount\" (numeric, required) The amount to send to the lbrycrd address. eg 0.1\n"
|
||||
"\nResult:\n"
|
||||
"\"transactionid\" (string) The new transaction id.\n"
|
||||
);
|
||||
|
||||
uint256 hash;
|
||||
hash.SetHex(params[0].get_str());
|
||||
|
||||
CBitcoinAddress address(params[1].get_str());
|
||||
if (!address.IsValid())
|
||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address");
|
||||
|
||||
CAmount nAmount = AmountFromValue(params[2]);
|
||||
|
||||
isminefilter filter = ISMINE_NCC;
|
||||
|
||||
UniValue entry;
|
||||
if (!pwalletMain->mapWallet.count(hash))
|
||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid or non-wallet transaction id");
|
||||
|
||||
const CWalletTx& wtx = pwalletMain->mapWallet[hash];
|
||||
int op;
|
||||
std::vector<std::vector<unsigned char> > vvchParams;
|
||||
CWalletTx wtxNew;
|
||||
bool fFound = false;
|
||||
for (unsigned int i = 0; !fFound && i < wtx.vout.size(); i++)
|
||||
{
|
||||
if ((filter & pwalletMain->IsMine(wtx.vout[i])))
|
||||
{
|
||||
if (DecodeNCCScript(wtx.vout[i].scriptPubKey, op, vvchParams))
|
||||
{
|
||||
EnsureWalletIsUnlocked();
|
||||
AbandonName(address.Get(), nAmount, wtxNew, wtx, i);
|
||||
fFound = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!fFound)
|
||||
throw runtime_error("Error: The given transaction contains no NCC scripts owned by this wallet");
|
||||
return wtxNew.GetHash().GetHex();
|
||||
}
|
||||
|
||||
|
||||
static void MaybePushAddress(UniValue& entry, const CTxDestination &dest);
|
||||
|
||||
|
||||
void ListNameClaims(const CWalletTx& wtx, const string& strAccount, int nMinDepth, UniValue& ret, const isminefilter& filter, bool list_spent)
|
||||
{
|
||||
CAmount nFee;
|
||||
string strSentAccount;
|
||||
list<COutputEntry> listSent;
|
||||
list<COutputEntry> listReceived;
|
||||
|
||||
wtx.GetAmounts(listReceived, listSent, nFee, strSentAccount, filter);
|
||||
|
||||
bool fAllAccounts = (strAccount == string("*"));
|
||||
|
||||
// Only care about sent
|
||||
if ((!listSent.empty() || nFee != 0) && (fAllAccounts || strAccount == strSentAccount))
|
||||
{
|
||||
BOOST_FOREACH(const COutputEntry& s, listSent)
|
||||
{
|
||||
if (list_spent || !pwalletMain->IsSpent(wtx.GetHash(), s.vout))
|
||||
{
|
||||
UniValue entry(UniValue::VOBJ);
|
||||
const CScript& scriptPubKey = wtx.vout[s.vout].scriptPubKey;
|
||||
int op;
|
||||
vector<vector<unsigned char> > vvchParams;
|
||||
if (!DecodeNCCScript(scriptPubKey, op, vvchParams))
|
||||
{
|
||||
LogPrintf("ListNameClaims(): Txout classified as NCC could not be decoded. Txid: %s", wtx.GetHash().ToString());
|
||||
continue;
|
||||
}
|
||||
else if (vvchParams.size() != 2)
|
||||
{
|
||||
LogPrintf("ListNameClaims(): Wrong number of params to name claim script. Got %d, expected 2. Txid: %s", vvchParams.size(), wtx.GetHash().ToString());
|
||||
continue;
|
||||
}
|
||||
string sName (vvchParams[0].begin(), vvchParams[0].end());
|
||||
string sValue (vvchParams[1].begin(), vvchParams[1].end());
|
||||
entry.push_back(Pair("name", sName));
|
||||
entry.push_back(Pair("value", sValue));
|
||||
entry.push_back(Pair("txid", wtx.GetHash().ToString()));
|
||||
entry.push_back(Pair("account", strSentAccount));
|
||||
MaybePushAddress(entry, s.destination);
|
||||
entry.push_back(Pair("category", "name"));
|
||||
entry.push_back(Pair("amount", ValueFromAmount(s.amount)));
|
||||
entry.push_back(Pair("vout", s.vout));
|
||||
entry.push_back(Pair("fee", ValueFromAmount(nFee)));
|
||||
BlockMap::iterator it = mapBlockIndex.find(wtx.hashBlock);
|
||||
if (it != mapBlockIndex.end())
|
||||
{
|
||||
CBlockIndex* pindex = it->second;
|
||||
if (pindex)
|
||||
{
|
||||
entry.push_back(Pair("height", pindex->nHeight));
|
||||
entry.push_back(Pair("expiration height", pindex->nHeight + pnccTrie->nExpirationTime));
|
||||
if (pindex->nHeight + pnccTrie->nExpirationTime > chainActive.Height())
|
||||
{
|
||||
entry.push_back(Pair("expired", false));
|
||||
entry.push_back(Pair("blocks to expiration", pindex->nHeight + pnccTrie->nExpirationTime - chainActive.Height()));
|
||||
}
|
||||
else
|
||||
{
|
||||
entry.push_back(Pair("expired", true));
|
||||
}
|
||||
}
|
||||
}
|
||||
entry.push_back(Pair("confirmations", wtx.GetDepthInMainChain()));
|
||||
entry.push_back(Pair("is spent", pwalletMain->IsSpent(wtx.GetHash(), s.vout)));
|
||||
entry.push_back(Pair("is in name trie", pnccTrie->haveClaim(sName, wtx.GetHash(), s.vout)));
|
||||
ret.push_back(entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
UniValue listnameclaims(const UniValue& params, bool fHelp)
|
||||
{
|
||||
if (!EnsureWalletIsAvailable(fHelp))
|
||||
return NullUniValue;
|
||||
|
||||
if (fHelp || params.size() > 2)
|
||||
throw runtime_error(
|
||||
"listnameclaims activeonly minconf\n"
|
||||
"Return a list of all transactions claiming names.\n"
|
||||
"\nArguments\n"
|
||||
"1. activeonly (bool, optional, not implemented) Whether to only include transactions which are still active, i.e. have not been spent. Default is false.\n"
|
||||
"2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many time.\n"
|
||||
"\nResult:\n"
|
||||
"[\n"
|
||||
" {\n"
|
||||
" \"name\":\"claimedname\", (string) The name that is claimed.\n"
|
||||
" \"value\":\"value\" (string) The value assigned to the name.\n"
|
||||
" \"account\":\"accountname\", (string) The account name associated with the transaction. \n"
|
||||
" It will be \"\" for the default account.\n"
|
||||
" \"address\":\"lbrycrdaddress\", (string) The lbrycrd address of the transaction.\n"
|
||||
" \"category\":\"name\" (string) Always name\n"
|
||||
" \"amount\": x.xxx, (numeric) The amount in LBC.\n"
|
||||
" \"vout\": n, (numeric) The vout value\n"
|
||||
" \"fee\": x.xxx, (numeric) The amount of the fee in LBC.\n"
|
||||
" \"height\": n (numeric) The height of the block in which this transaction was included.\n"
|
||||
" \"confirmations\": n, (numeric) The number of confirmations for the transaction\n"
|
||||
" \"blockhash\": \"hashvalue\", (string) The block hash containing the transaction.\n"
|
||||
" \"blockindex\": n, (numeric) The block index containing the transaction.\n"
|
||||
" \"txid\": \"transactionid\", (string) The transaction id.\n"
|
||||
" \"time\": xxx, (numeric) The transaction time in seconds since epoch (midnight Jan 1 1970 GMT).\n"
|
||||
" \"timereceived\": xxx, (numeric) The time received in seconds since epoch (midnight Jan 1 1970 GMT).\n"
|
||||
" \"comment\": \"...\", (string) If a comment is associated with the transaction.\n"
|
||||
" }\n"
|
||||
"]\n"
|
||||
|
||||
);
|
||||
|
||||
string strAccount = "*";
|
||||
|
||||
bool fListSpent = true;
|
||||
if (params.size() > 0)
|
||||
fListSpent = !params[0].get_bool();
|
||||
isminefilter ncc_filter = ISMINE_NCC;
|
||||
|
||||
// Minimum confirmations
|
||||
int nMinDepth = 1;
|
||||
if (params.size() > 1)
|
||||
nMinDepth = params[1].get_int();
|
||||
|
||||
UniValue ret(UniValue::VARR);
|
||||
|
||||
std::list<CAccountingEntry> acentries;
|
||||
CWallet::TxItems txOrdered = pwalletMain->OrderedTxItems(acentries, strAccount);
|
||||
|
||||
for (CWallet::TxItems::reverse_iterator it = txOrdered.rbegin(); it != txOrdered.rend(); ++it)
|
||||
{
|
||||
CWalletTx *const pwtx = (*it).second.first;
|
||||
if (pwtx != 0 && pwtx->GetDepthInMainChain() >= nMinDepth)
|
||||
ListNameClaims(*pwtx, strAccount, 0, ret, ncc_filter, fListSpent);
|
||||
}
|
||||
|
||||
vector<UniValue> arrTmp = ret.getValues();
|
||||
|
||||
std::reverse(arrTmp.begin(), arrTmp.end()); // Return oldest to newest
|
||||
|
||||
ret.clear();
|
||||
ret.setArray();
|
||||
ret.push_backV(arrTmp);
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static void SendMoney(const CTxDestination &address, CAmount nValue, bool fSubtractFeeFromAmount, CWalletTx& wtxNew)
|
||||
{
|
||||
CAmount curBalance = pwalletMain->GetBalance();
|
||||
@@ -384,19 +811,19 @@ UniValue sendtoaddress(const UniValue& params, bool fHelp)
|
||||
|
||||
if (fHelp || params.size() < 2 || params.size() > 5)
|
||||
throw runtime_error(
|
||||
"sendtoaddress \"bitcoinaddress\" amount ( \"comment\" \"comment-to\" subtractfeefromamount )\n"
|
||||
"sendtoaddress \"lbrycrdaddress\" amount ( \"comment\" \"comment-to\" subtractfeefromamount )\n"
|
||||
"\nSend an amount to a given address. The amount is a real and is rounded to the nearest 0.00000001\n"
|
||||
+ HelpRequiringPassphrase() +
|
||||
"\nArguments:\n"
|
||||
"1. \"bitcoinaddress\" (string, required) The bitcoin address to send to.\n"
|
||||
"2. \"amount\" (numeric, required) The amount in btc to send. eg 0.1\n"
|
||||
"1. \"lbrycrdaddress\" (string, required) The lbrycrd address to send to.\n"
|
||||
"2. \"amount\" (numeric, required) The amount in LBC to send. eg 0.1\n"
|
||||
"3. \"comment\" (string, optional) A comment used to store what the transaction is for. \n"
|
||||
" This is not part of the transaction, just kept in your wallet.\n"
|
||||
"4. \"comment-to\" (string, optional) A comment to store the name of the person or organization \n"
|
||||
" to which you're sending the transaction. This is not part of the \n"
|
||||
" transaction, just kept in your wallet.\n"
|
||||
"5. subtractfeefromamount (boolean, optional, default=false) The fee will be deducted from the amount being sent.\n"
|
||||
" The recipient will receive less bitcoins than you enter in the amount field.\n"
|
||||
" The recipient will receive less LBC than you enter in the amount field.\n"
|
||||
"\nResult:\n"
|
||||
"\"transactionid\" (string) The transaction id.\n"
|
||||
"\nExamples:\n"
|
||||
@@ -450,8 +877,8 @@ UniValue listaddressgroupings(const UniValue& params, bool fHelp)
|
||||
"[\n"
|
||||
" [\n"
|
||||
" [\n"
|
||||
" \"bitcoinaddress\", (string) The bitcoin address\n"
|
||||
" amount, (numeric) The amount in btc\n"
|
||||
" \"lbrycrdaddress\", (string) The lbrycrd address\n"
|
||||
" amount, (numeric) The amount in LBC\n"
|
||||
" \"account\" (string, optional) The account (DEPRECATED)\n"
|
||||
" ]\n"
|
||||
" ,...\n"
|
||||
@@ -494,11 +921,11 @@ UniValue signmessage(const UniValue& params, bool fHelp)
|
||||
|
||||
if (fHelp || params.size() != 2)
|
||||
throw runtime_error(
|
||||
"signmessage \"bitcoinaddress\" \"message\"\n"
|
||||
"signmessage \"lbrycrdaddress\" \"message\"\n"
|
||||
"\nSign a message with the private key of an address"
|
||||
+ HelpRequiringPassphrase() + "\n"
|
||||
"\nArguments:\n"
|
||||
"1. \"bitcoinaddress\" (string, required) The bitcoin address to use for the private key.\n"
|
||||
"1. \"lbrycrdaddress\" (string, required) The lbrycrd address to use for the private key.\n"
|
||||
"2. \"message\" (string, required) The message to create a signature of.\n"
|
||||
"\nResult:\n"
|
||||
"\"signature\" (string) The signature of the message encoded in base 64\n"
|
||||
@@ -550,13 +977,13 @@ UniValue getreceivedbyaddress(const UniValue& params, bool fHelp)
|
||||
|
||||
if (fHelp || params.size() < 1 || params.size() > 2)
|
||||
throw runtime_error(
|
||||
"getreceivedbyaddress \"bitcoinaddress\" ( minconf )\n"
|
||||
"\nReturns the total amount received by the given bitcoinaddress in transactions with at least minconf confirmations.\n"
|
||||
"getreceivedbyaddress \"lbrycrdaddress\" ( minconf )\n"
|
||||
"\nReturns the total amount received by the given lbrycrdaddress in transactions with at least minconf confirmations.\n"
|
||||
"\nArguments:\n"
|
||||
"1. \"bitcoinaddress\" (string, required) The bitcoin address for transactions.\n"
|
||||
"1. \"lbrycrdaddress\" (string, required) The lbrycrd address for transactions.\n"
|
||||
"2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.\n"
|
||||
"\nResult:\n"
|
||||
"amount (numeric) The total amount in btc received at this address.\n"
|
||||
"amount (numeric) The total amount in LBC received at this address.\n"
|
||||
"\nExamples:\n"
|
||||
"\nThe amount from transactions with at least 1 confirmation\n"
|
||||
+ HelpExampleCli("getreceivedbyaddress", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\"") +
|
||||
@@ -614,7 +1041,7 @@ UniValue getreceivedbyaccount(const UniValue& params, bool fHelp)
|
||||
"1. \"account\" (string, required) The selected account, may be the default account using \"\".\n"
|
||||
"2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.\n"
|
||||
"\nResult:\n"
|
||||
"amount (numeric) The total amount in btc received for this account.\n"
|
||||
"amount (numeric) The total amount in LBC received for this account.\n"
|
||||
"\nExamples:\n"
|
||||
"\nAmount received by the default account with at least 1 confirmation\n"
|
||||
+ HelpExampleCli("getreceivedbyaccount", "\"\"") +
|
||||
@@ -707,7 +1134,7 @@ UniValue getbalance(const UniValue& params, bool fHelp)
|
||||
"2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.\n"
|
||||
"3. includeWatchonly (bool, optional, default=false) Also include balance in watchonly addresses (see 'importaddress')\n"
|
||||
"\nResult:\n"
|
||||
"amount (numeric) The total amount in btc received for this account.\n"
|
||||
"amount (numeric) The total amount in LBC received for this account.\n"
|
||||
"\nExamples:\n"
|
||||
"\nThe total amount in the wallet\n"
|
||||
+ HelpExampleCli("getbalance", "") +
|
||||
@@ -798,9 +1225,9 @@ UniValue movecmd(const UniValue& params, bool fHelp)
|
||||
"\nResult:\n"
|
||||
"true|false (boolean) true if successfull.\n"
|
||||
"\nExamples:\n"
|
||||
"\nMove 0.01 btc from the default account to the account named tabby\n"
|
||||
"\nMove 0.01 LBC from the default account to the account named tabby\n"
|
||||
+ HelpExampleCli("move", "\"\" \"tabby\" 0.01") +
|
||||
"\nMove 0.01 btc timotei to akiko with a comment and funds have 6 confirmations\n"
|
||||
"\nMove 0.01 LBC timotei to akiko with a comment and funds have 6 confirmations\n"
|
||||
+ HelpExampleCli("move", "\"timotei\" \"akiko\" 0.01 6 \"happy birthday!\"") +
|
||||
"\nAs a json rpc call\n"
|
||||
+ HelpExampleRpc("move", "\"timotei\", \"akiko\", 0.01, 6, \"happy birthday!\"")
|
||||
@@ -860,14 +1287,14 @@ UniValue sendfrom(const UniValue& params, bool fHelp)
|
||||
|
||||
if (fHelp || params.size() < 3 || params.size() > 6)
|
||||
throw runtime_error(
|
||||
"sendfrom \"fromaccount\" \"tobitcoinaddress\" amount ( minconf \"comment\" \"comment-to\" )\n"
|
||||
"\nDEPRECATED (use sendtoaddress). Sent an amount from an account to a bitcoin address.\n"
|
||||
"sendfrom \"fromaccount\" \"tolbrycrdaddress\" amount ( minconf \"comment\" \"comment-to\" )\n"
|
||||
"\nDEPRECATED (use sendtoaddress). Sent an amount from an account to a lbrycrd address.\n"
|
||||
"The amount is a real and is rounded to the nearest 0.00000001."
|
||||
+ HelpRequiringPassphrase() + "\n"
|
||||
"\nArguments:\n"
|
||||
"1. \"fromaccount\" (string, required) The name of the account to send funds from. May be the default account using \"\".\n"
|
||||
"2. \"tobitcoinaddress\" (string, required) The bitcoin address to send funds to.\n"
|
||||
"3. amount (numeric, required) The amount in btc. (transaction fee is added on top).\n"
|
||||
"2. \"tolbrycrdaddress\" (string, required) The lbrycrd address to send funds to.\n"
|
||||
"3. amount (numeric, required) The amount in LBC. (transaction fee is added on top).\n"
|
||||
"4. minconf (numeric, optional, default=1) Only use funds with at least this many confirmations.\n"
|
||||
"5. \"comment\" (string, optional) A comment used to store what the transaction is for. \n"
|
||||
" This is not part of the transaction, just kept in your wallet.\n"
|
||||
@@ -877,7 +1304,7 @@ UniValue sendfrom(const UniValue& params, bool fHelp)
|
||||
"\nResult:\n"
|
||||
"\"transactionid\" (string) The transaction id.\n"
|
||||
"\nExamples:\n"
|
||||
"\nSend 0.01 btc from the default account to the address, must have at least 1 confirmation\n"
|
||||
"\nSend 0.01 LBC from the default account to the address, must have at least 1 confirmation\n"
|
||||
+ HelpExampleCli("sendfrom", "\"\" \"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.01") +
|
||||
"\nSend 0.01 from the tabby account to the given address, funds must have at least 6 confirmations\n"
|
||||
+ HelpExampleCli("sendfrom", "\"tabby\" \"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.01 6 \"donation\" \"seans outpost\"") +
|
||||
@@ -932,14 +1359,14 @@ UniValue sendmany(const UniValue& params, bool fHelp)
|
||||
"1. \"fromaccount\" (string, required) DEPRECATED. The account to send the funds from. Should be \"\" for the default account\n"
|
||||
"2. \"amounts\" (string, required) A json object with addresses and amounts\n"
|
||||
" {\n"
|
||||
" \"address\":amount (numeric) The bitcoin address is the key, the numeric amount in btc is the value\n"
|
||||
" \"address\":amount (numeric) The lbrycrd address is the key, the numeric amount in LBC is the value\n"
|
||||
" ,...\n"
|
||||
" }\n"
|
||||
"3. minconf (numeric, optional, default=1) Only use the balance confirmed at least this many times.\n"
|
||||
"4. \"comment\" (string, optional) A comment\n"
|
||||
"5. subtractfeefromamount (string, optional) A json array with addresses.\n"
|
||||
" The fee will be equally deducted from the amount of each selected address.\n"
|
||||
" Those recipients will receive less bitcoins than you enter in their corresponding amount field.\n"
|
||||
" Those recipients will receive less LBC than you enter in their corresponding amount field.\n"
|
||||
" If no addresses are specified here, the sender pays the fee.\n"
|
||||
" [\n"
|
||||
" \"address\" (string) Subtract fee from this address\n"
|
||||
@@ -1046,15 +1473,15 @@ UniValue addmultisigaddress(const UniValue& params, bool fHelp)
|
||||
|
||||
"\nArguments:\n"
|
||||
"1. nrequired (numeric, required) The number of required signatures out of the n keys or addresses.\n"
|
||||
"2. \"keysobject\" (string, required) A json array of bitcoin addresses or hex-encoded public keys\n"
|
||||
"2. \"keysobject\" (string, required) A json array of lbrycrd addresses or hex-encoded public keys\n"
|
||||
" [\n"
|
||||
" \"address\" (string) bitcoin address or hex-encoded public key\n"
|
||||
" \"address\" (string) lbrycrd address or hex-encoded public key\n"
|
||||
" ...,\n"
|
||||
" ]\n"
|
||||
"3. \"account\" (string, optional) DEPRECATED. An account to assign the addresses to.\n"
|
||||
|
||||
"\nResult:\n"
|
||||
"\"bitcoinaddress\" (string) A bitcoin address associated with the keys.\n"
|
||||
"\"lbrycrdaddress\" (string) A lbrycrd address associated with the keys.\n"
|
||||
|
||||
"\nExamples:\n"
|
||||
"\nAdd a multisig address from 2 addresses\n"
|
||||
@@ -1233,7 +1660,7 @@ UniValue listreceivedbyaddress(const UniValue& params, bool fHelp)
|
||||
" \"involvesWatchonly\" : true, (bool) Only returned if imported addresses were involved in transaction\n"
|
||||
" \"address\" : \"receivingaddress\", (string) The receiving address\n"
|
||||
" \"account\" : \"accountname\", (string) DEPRECATED. The account of the receiving address. The default account is \"\".\n"
|
||||
" \"amount\" : x.xxx, (numeric) The total amount in btc received by the address\n"
|
||||
" \"amount\" : x.xxx, (numeric) The total amount in LBC received by the address\n"
|
||||
" \"confirmations\" : n (numeric) The number of confirmations of the most recent transaction included\n"
|
||||
" }\n"
|
||||
" ,...\n"
|
||||
@@ -1399,17 +1826,17 @@ UniValue listtransactions(const UniValue& params, bool fHelp)
|
||||
" {\n"
|
||||
" \"account\":\"accountname\", (string) DEPRECATED. The account name associated with the transaction. \n"
|
||||
" It will be \"\" for the default account.\n"
|
||||
" \"address\":\"bitcoinaddress\", (string) The bitcoin address of the transaction. Not present for \n"
|
||||
" \"address\":\"lbrycrdaddress\", (string) The lbrycrd address of the transaction. Not present for \n"
|
||||
" move transactions (category = move).\n"
|
||||
" \"category\":\"send|receive|move\", (string) The transaction category. 'move' is a local (off blockchain)\n"
|
||||
" transaction between accounts, and not associated with an address,\n"
|
||||
" transaction id or block. 'send' and 'receive' transactions are \n"
|
||||
" associated with an address, transaction id and block details\n"
|
||||
" \"amount\": x.xxx, (numeric) The amount in btc. This is negative for the 'send' category, and for the\n"
|
||||
" \"amount\": x.xxx, (numeric) The amount in LBC. This is negative for the 'send' category, and for the\n"
|
||||
" 'move' category for moves outbound. It is positive for the 'receive' category,\n"
|
||||
" and for the 'move' category for inbound funds.\n"
|
||||
" \"vout\" : n, (numeric) the vout value\n"
|
||||
" \"fee\": x.xxx, (numeric) The amount of the fee in btc. This is negative and only available for the \n"
|
||||
" \"fee\": x.xxx, (numeric) The amount of the fee in LBC. This is negative and only available for the \n"
|
||||
" 'send' category of transactions.\n"
|
||||
" \"confirmations\": n, (numeric) The number of confirmations for the transaction. Available for 'send' and \n"
|
||||
" 'receive' category of transactions.\n"
|
||||
@@ -1598,12 +2025,12 @@ UniValue listsinceblock(const UniValue& params, bool fHelp)
|
||||
"{\n"
|
||||
" \"transactions\": [\n"
|
||||
" \"account\":\"accountname\", (string) DEPRECATED. The account name associated with the transaction. Will be \"\" for the default account.\n"
|
||||
" \"address\":\"bitcoinaddress\", (string) The bitcoin address of the transaction. Not present for move transactions (category = move).\n"
|
||||
" \"address\":\"lbrycrdaddress\", (string) The lbrycrd address of the transaction. Not present for move transactions (category = move).\n"
|
||||
" \"category\":\"send|receive\", (string) The transaction category. 'send' has negative amounts, 'receive' has positive amounts.\n"
|
||||
" \"amount\": x.xxx, (numeric) The amount in btc. This is negative for the 'send' category, and for the 'move' category for moves \n"
|
||||
" \"amount\": x.xxx, (numeric) The amount in LBC. This is negative for the 'send' category, and for the 'move' category for moves \n"
|
||||
" outbound. It is positive for the 'receive' category, and for the 'move' category for inbound funds.\n"
|
||||
" \"vout\" : n, (numeric) the vout value\n"
|
||||
" \"fee\": x.xxx, (numeric) The amount of the fee in btc. This is negative and only available for the 'send' category of transactions.\n"
|
||||
" \"fee\": x.xxx, (numeric) The amount of the fee in LBC. This is negative and only available for the 'send' category of transactions.\n"
|
||||
" \"confirmations\": n, (numeric) The number of confirmations for the transaction. Available for 'send' and 'receive' category of transactions.\n"
|
||||
" \"blockhash\": \"hashvalue\", (string) The block hash containing the transaction. Available for 'send' and 'receive' category of transactions.\n"
|
||||
" \"blockindex\": n, (numeric) The block index containing the transaction. Available for 'send' and 'receive' category of transactions.\n"
|
||||
@@ -1686,7 +2113,7 @@ UniValue gettransaction(const UniValue& params, bool fHelp)
|
||||
"2. \"includeWatchonly\" (bool, optional, default=false) Whether to include watchonly addresses in balance calculation and details[]\n"
|
||||
"\nResult:\n"
|
||||
"{\n"
|
||||
" \"amount\" : x.xxx, (numeric) The transaction amount in btc\n"
|
||||
" \"amount\" : x.xxx, (numeric) The transaction amount in LBC\n"
|
||||
" \"confirmations\" : n, (numeric) The number of confirmations\n"
|
||||
" \"blockhash\" : \"hash\", (string) The block hash\n"
|
||||
" \"blockindex\" : xx, (numeric) The block index\n"
|
||||
@@ -1697,9 +2124,9 @@ UniValue gettransaction(const UniValue& params, bool fHelp)
|
||||
" \"details\" : [\n"
|
||||
" {\n"
|
||||
" \"account\" : \"accountname\", (string) DEPRECATED. The account name involved in the transaction, can be \"\" for the default account.\n"
|
||||
" \"address\" : \"bitcoinaddress\", (string) The bitcoin address involved in the transaction\n"
|
||||
" \"address\" : \"lbrycrdaddress\", (string) The lbrycrd address involved in the transaction\n"
|
||||
" \"category\" : \"send|receive\", (string) The category, either 'send' or 'receive'\n"
|
||||
" \"amount\" : x.xxx (numeric) The amount in btc\n"
|
||||
" \"amount\" : x.xxx (numeric) The amount in LBC\n"
|
||||
" \"vout\" : n, (numeric) the vout value\n"
|
||||
" }\n"
|
||||
" ,...\n"
|
||||
@@ -1829,7 +2256,7 @@ UniValue walletpassphrase(const UniValue& params, bool fHelp)
|
||||
throw runtime_error(
|
||||
"walletpassphrase \"passphrase\" timeout\n"
|
||||
"\nStores the wallet decryption key in memory for 'timeout' seconds.\n"
|
||||
"This is needed prior to performing transactions related to private keys such as sending bitcoins\n"
|
||||
"This is needed prior to performing transactions related to private keys such as sending LBC\n"
|
||||
"\nArguments:\n"
|
||||
"1. \"passphrase\" (string, required) The wallet passphrase\n"
|
||||
"2. timeout (numeric, required) The time to keep the decryption key in seconds.\n"
|
||||
@@ -1984,10 +2411,10 @@ UniValue encryptwallet(const UniValue& params, bool fHelp)
|
||||
"\nExamples:\n"
|
||||
"\nEncrypt you wallet\n"
|
||||
+ HelpExampleCli("encryptwallet", "\"my pass phrase\"") +
|
||||
"\nNow set the passphrase to use the wallet, such as for signing or sending bitcoin\n"
|
||||
"\nNow set the passphrase to use the wallet, such as for signing or sending LBC\n"
|
||||
+ HelpExampleCli("walletpassphrase", "\"my pass phrase\"") +
|
||||
"\nNow we can so something like sign\n"
|
||||
+ HelpExampleCli("signmessage", "\"bitcoinaddress\" \"test message\"") +
|
||||
+ HelpExampleCli("signmessage", "\"lbrycrdaddress\" \"test message\"") +
|
||||
"\nNow lock the wallet again by removing the passphrase\n"
|
||||
+ HelpExampleCli("walletlock", "") +
|
||||
"\nAs a json rpc call\n"
|
||||
@@ -2032,7 +2459,7 @@ UniValue lockunspent(const UniValue& params, bool fHelp)
|
||||
"lockunspent unlock [{\"txid\":\"txid\",\"vout\":n},...]\n"
|
||||
"\nUpdates list of temporarily unspendable outputs.\n"
|
||||
"Temporarily lock (unlock=false) or unlock (unlock=true) specified transaction outputs.\n"
|
||||
"A locked transaction output will not be chosen by automatic coin selection, when spending bitcoins.\n"
|
||||
"A locked transaction output will not be chosen by automatic coin selection, when spending LBC.\n"
|
||||
"Locks are stored in memory only. Nodes start with zero locked outputs, and the locked output list\n"
|
||||
"is always cleared (by virtue of process exit) when a node stops or fails.\n"
|
||||
"Also see the listunspent call\n"
|
||||
@@ -2165,7 +2592,7 @@ UniValue settxfee(const UniValue& params, bool fHelp)
|
||||
"settxfee amount\n"
|
||||
"\nSet the transaction fee per kB.\n"
|
||||
"\nArguments:\n"
|
||||
"1. amount (numeric, required) The transaction fee in BTC/kB rounded to the nearest 0.00000001\n"
|
||||
"1. amount (numeric, required) The transaction fee in LBC/kB rounded to the nearest 0.00000001\n"
|
||||
"\nResult\n"
|
||||
"true|false (boolean) Returns true if successful\n"
|
||||
"\nExamples:\n"
|
||||
@@ -2194,8 +2621,8 @@ UniValue getwalletinfo(const UniValue& params, bool fHelp)
|
||||
"\nResult:\n"
|
||||
"{\n"
|
||||
" \"walletversion\": xxxxx, (numeric) the wallet version\n"
|
||||
" \"balance\": xxxxxxx, (numeric) the total confirmed bitcoin balance of the wallet\n"
|
||||
" \"unconfirmed_balance\": xxx, (numeric) the total unconfirmed bitcoin balance of the wallet\n"
|
||||
" \"balance\": xxxxxxx, (numeric) the total confirmed lbrycrd balance of the wallet\n"
|
||||
" \"unconfirmed_balance\": xxx, (numeric) the total unconfirmed lbrycrd balance of the wallet\n"
|
||||
" \"immature_balance\": xxxxxx, (numeric) the total immature balance of the wallet\n"
|
||||
" \"txcount\": xxxxxxx, (numeric) the total number of transactions in the wallet\n"
|
||||
" \"keypoololdest\": xxxxxx, (numeric) the timestamp (seconds since GMT epoch) of the oldest pre-generated key in the key pool\n"
|
||||
@@ -2263,9 +2690,9 @@ UniValue listunspent(const UniValue& params, bool fHelp)
|
||||
"\nArguments:\n"
|
||||
"1. minconf (numeric, optional, default=1) The minimum confirmations to filter\n"
|
||||
"2. maxconf (numeric, optional, default=9999999) The maximum confirmations to filter\n"
|
||||
"3. \"addresses\" (string) A json array of bitcoin addresses to filter\n"
|
||||
"3. \"addresses\" (string) A json array of lbrycrd addresses to filter\n"
|
||||
" [\n"
|
||||
" \"address\" (string) bitcoin address\n"
|
||||
" \"address\" (string) lbrycrd address\n"
|
||||
" ,...\n"
|
||||
" ]\n"
|
||||
"\nResult\n"
|
||||
@@ -2273,10 +2700,10 @@ UniValue listunspent(const UniValue& params, bool fHelp)
|
||||
" {\n"
|
||||
" \"txid\" : \"txid\", (string) the transaction id \n"
|
||||
" \"vout\" : n, (numeric) the vout value\n"
|
||||
" \"address\" : \"address\", (string) the bitcoin address\n"
|
||||
" \"address\" : \"address\", (string) the lbrycrd address\n"
|
||||
" \"account\" : \"account\", (string) DEPRECATED. The associated account, or \"\" for the default account\n"
|
||||
" \"scriptPubKey\" : \"key\", (string) the script key\n"
|
||||
" \"amount\" : x.xxx, (numeric) the transaction amount in btc\n"
|
||||
" \"amount\" : x.xxx, (numeric) the transaction amount in LBC\n"
|
||||
" \"confirmations\" : n (numeric) The number of confirmations\n"
|
||||
" }\n"
|
||||
" ,...\n"
|
||||
|
||||
+32
-8
@@ -17,6 +17,7 @@
|
||||
#include "timedata.h"
|
||||
#include "util.h"
|
||||
#include "utilmoneystr.h"
|
||||
#include "ncc.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
@@ -832,11 +833,14 @@ bool CWallet::IsChange(const CTxOut& txout) const
|
||||
if (::IsMine(*this, txout.scriptPubKey))
|
||||
{
|
||||
CTxDestination address;
|
||||
if (!ExtractDestination(txout.scriptPubKey, address))
|
||||
|
||||
const CScript& scriptPubKey = StripNCCScriptPrefix(txout.scriptPubKey);
|
||||
|
||||
if (!ExtractDestination(scriptPubKey, address))
|
||||
return true;
|
||||
|
||||
LOCK(cs_wallet);
|
||||
if (!mapAddressBook.count(address))
|
||||
if (!mapAddressBook.count(address) && (scriptPubKey == txout.scriptPubKey))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -978,7 +982,8 @@ void CWalletTx::GetAmounts(list<COutputEntry>& listReceived,
|
||||
|
||||
// In either case, we need to get the destination address
|
||||
CTxDestination address;
|
||||
if (!ExtractDestination(txout.scriptPubKey, address))
|
||||
const CScript& scriptPubKey = StripNCCScriptPrefix(txout.scriptPubKey);
|
||||
if (!ExtractDestination(scriptPubKey, address))
|
||||
{
|
||||
LogPrintf("CWalletTx::GetAmounts: Unknown transaction type found, txid %s\n",
|
||||
this->GetHash().ToString());
|
||||
@@ -988,7 +993,7 @@ void CWalletTx::GetAmounts(list<COutputEntry>& listReceived,
|
||||
COutputEntry output = {address, txout.nValue, (int)i};
|
||||
|
||||
// If we are debited by the transaction, add the output as a "sent" entry
|
||||
if (nDebit > 0)
|
||||
if (nDebit > 0 || filter == ISMINE_NCC)
|
||||
listSent.push_back(output);
|
||||
|
||||
// If we are receiving the output, add it as a "received" entry
|
||||
@@ -1687,7 +1692,9 @@ bool CWallet::SelectCoins(const CAmount& nTargetValue, set<pair<const CWalletTx*
|
||||
}
|
||||
|
||||
bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend,
|
||||
CWalletTx& wtxNew, CReserveKey& reservekey, CAmount& nFeeRet, int& nChangePosRet, std::string& strFailReason, const CCoinControl* coinControl)
|
||||
CWalletTx& wtxNew, CReserveKey& reservekey, CAmount& nFeeRet, int& nChangePosRet,
|
||||
std::string& strFailReason, const CCoinControl* coinControl,
|
||||
const CWalletTx* pwtxIn, unsigned int nTxOut)
|
||||
{
|
||||
CAmount nValue = 0;
|
||||
unsigned int nSubtractFeeFromAmount = 0;
|
||||
@@ -1713,6 +1720,8 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend,
|
||||
wtxNew.BindWallet(this);
|
||||
CMutableTransaction txNew;
|
||||
|
||||
bool fUsingWtxIn = (pwtxIn != NULL);
|
||||
|
||||
// Discourage fee sniping.
|
||||
//
|
||||
// However because of a off-by-one-error in previous versions we need to
|
||||
@@ -1783,13 +1792,22 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend,
|
||||
txNew.vout.push_back(txout);
|
||||
}
|
||||
|
||||
CAmount nValueNeeded = nTotalValue;
|
||||
if (fUsingWtxIn)
|
||||
{
|
||||
nValueNeeded = nValueNeeded - pwtxIn->vout[nTxOut].nValue;
|
||||
}
|
||||
|
||||
// Choose coins to use
|
||||
set<pair<const CWalletTx*,unsigned int> > setCoins;
|
||||
CAmount nValueIn = 0;
|
||||
if (!SelectCoins(nTotalValue, setCoins, nValueIn, coinControl))
|
||||
if (!fUsingWtxIn || nValueNeeded > 0)
|
||||
{
|
||||
strFailReason = _("Insufficient funds");
|
||||
return false;
|
||||
if (!SelectCoins(nValueNeeded, setCoins, nValueIn, coinControl))
|
||||
{
|
||||
strFailReason = _("Insufficient funds");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
BOOST_FOREACH(PAIRTYPE(const CWalletTx*, unsigned int) pcoin, setCoins)
|
||||
{
|
||||
@@ -1804,6 +1822,12 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend,
|
||||
dPriority += (double)nCredit * age;
|
||||
}
|
||||
|
||||
if (fUsingWtxIn)
|
||||
{
|
||||
nValueIn += pwtxIn->vout[nTxOut].nValue;
|
||||
setCoins.insert(make_pair(pwtxIn, nTxOut));
|
||||
}
|
||||
|
||||
CAmount nChange = nValueIn - nValue;
|
||||
if (nSubtractFeeFromAmount == 0)
|
||||
nChange -= nFeeRet;
|
||||
|
||||
+1
-1
@@ -626,7 +626,7 @@ public:
|
||||
CAmount GetUnconfirmedWatchOnlyBalance() const;
|
||||
CAmount GetImmatureWatchOnlyBalance() const;
|
||||
bool CreateTransaction(const std::vector<CRecipient>& vecSend,
|
||||
CWalletTx& wtxNew, CReserveKey& reservekey, CAmount& nFeeRet, int& nChangePosRet, std::string& strFailReason, const CCoinControl *coinControl = NULL);
|
||||
CWalletTx& wtxNew, CReserveKey& reservekey, CAmount& nFeeRet, int& nChangePosRet, std::string& strFailReason, const CCoinControl *coinControl = NULL, const CWalletTx* pwtxIn = NULL, unsigned int nTxOut = -1);
|
||||
bool CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey);
|
||||
|
||||
static CFeeRate minTxFee;
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "keystore.h"
|
||||
#include "script/script.h"
|
||||
#include "script/standard.h"
|
||||
#include "ncc.h"
|
||||
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
@@ -38,8 +39,17 @@ isminetype IsMine(const CKeyStore &keystore, const CScript& scriptPubKey)
|
||||
{
|
||||
vector<valtype> vSolutions;
|
||||
txnouttype whichType;
|
||||
if (!Solver(scriptPubKey, whichType, vSolutions)) {
|
||||
if (keystore.HaveWatchOnly(scriptPubKey))
|
||||
isminetype spendable_type = ISMINE_SPENDABLE;
|
||||
|
||||
CScript strippedScriptPubKey = StripNCCScriptPrefix(scriptPubKey);
|
||||
if (strippedScriptPubKey != scriptPubKey)
|
||||
{
|
||||
spendable_type = ISMINE_NCC;
|
||||
}
|
||||
|
||||
|
||||
if (!Solver(strippedScriptPubKey, whichType, vSolutions)) {
|
||||
if (keystore.HaveWatchOnly(strippedScriptPubKey))
|
||||
return ISMINE_WATCH_ONLY;
|
||||
return ISMINE_NO;
|
||||
}
|
||||
@@ -53,12 +63,12 @@ isminetype IsMine(const CKeyStore &keystore, const CScript& scriptPubKey)
|
||||
case TX_PUBKEY:
|
||||
keyID = CPubKey(vSolutions[0]).GetID();
|
||||
if (keystore.HaveKey(keyID))
|
||||
return ISMINE_SPENDABLE;
|
||||
return spendable_type;
|
||||
break;
|
||||
case TX_PUBKEYHASH:
|
||||
keyID = CKeyID(uint160(vSolutions[0]));
|
||||
if (keystore.HaveKey(keyID))
|
||||
return ISMINE_SPENDABLE;
|
||||
return spendable_type;
|
||||
break;
|
||||
case TX_SCRIPTHASH:
|
||||
{
|
||||
@@ -67,7 +77,7 @@ isminetype IsMine(const CKeyStore &keystore, const CScript& scriptPubKey)
|
||||
if (keystore.GetCScript(scriptID, subscript)) {
|
||||
isminetype ret = IsMine(keystore, subscript);
|
||||
if (ret == ISMINE_SPENDABLE)
|
||||
return ret;
|
||||
return spendable_type;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -80,7 +90,7 @@ isminetype IsMine(const CKeyStore &keystore, const CScript& scriptPubKey)
|
||||
// in shared-wallet situations.
|
||||
vector<valtype> keys(vSolutions.begin()+1, vSolutions.begin()+vSolutions.size()-1);
|
||||
if (HaveKeys(keys, keystore) == keys.size())
|
||||
return ISMINE_SPENDABLE;
|
||||
return spendable_type;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,8 @@ enum isminetype
|
||||
ISMINE_NO = 0,
|
||||
ISMINE_WATCH_ONLY = 1,
|
||||
ISMINE_SPENDABLE = 2,
|
||||
ISMINE_ALL = ISMINE_WATCH_ONLY | ISMINE_SPENDABLE
|
||||
ISMINE_NCC = 4,
|
||||
ISMINE_ALL = ISMINE_WATCH_ONLY | ISMINE_SPENDABLE | ISMINE_NCC
|
||||
};
|
||||
/** used for bitflags of isminetype */
|
||||
typedef uint8_t isminefilter;
|
||||
|
||||
Reference in new issue
Block a user