Skip to content

Commit

Permalink
Merge pull request dashpay#11 from erkmos/master-0.8
Browse files Browse the repository at this point in the history
Seednode and unit test updates
  • Loading branch information
erkmos committed Mar 16, 2014
2 parents c2ca6cb + 30f1ce9 commit 9128e90
Show file tree
Hide file tree
Showing 8 changed files with 158 additions and 30 deletions.
14 changes: 8 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
src/*.exe
src/litecoin
src/litecoind
src/test_litecoin
src/vertcoin
src/vertcoind
src/test_vertcoin
.*.swp
*.*~*
*.bak
Expand All @@ -14,12 +14,12 @@ src/test_litecoin
# Compilation and Qt preprocessor part
*.qm
Makefile
litecoin-qt
Litecoin-Qt.app
vertcoin-qt
Vertcoin-Qt.app

# Unit-tests
Makefile.test
litecoin-qt_test
vertcoin-qt_test

# Resources cpp
qrc_*.cpp
Expand All @@ -30,5 +30,7 @@ qrc_*.cpp
# Mac specific
.DS_Store
build
Info
Vertcoin-Qt.xcodeproj

!src/leveldb-*/Makefile
4 changes: 2 additions & 2 deletions contrib/seeds/README
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Utility to generate the pnSeed[] array that is compiled into the client
(see src/net.cpp).

The 600 seeds compiled into the 0.8 release were created from sipa's DNS seed data, like this:
The 600 seeds compiled into the 0.8 release were created from bengt's DNS seed data, like this:

curl -s http://bitcoin.sipa.be/seeds.txt | head -1000 | makeseeds.py
curl -s http://p2pool2.etyd.org/seeds | head -1000 | ./makeseeds.py

The input to makeseeds.py is assumed to be approximately sorted from most-reliable to least-reliable,
with IP:port first on each line (lines that don't match IPv4:port are ignored).
6 changes: 3 additions & 3 deletions contrib/seeds/makeseeds.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Generate pnSeed[] from Pieter's DNS seeder
# Generate pnSeed[] from Bengt's DNS seeder
#

NSEEDS=600
Expand All @@ -25,8 +25,8 @@ def main():
continue
ips.append(ip)

for row in range(0, min(NSEEDS,len(ips)), 8):
print " " + ", ".join([ "0x%08x"%i for i in ips[row:row+8] ]) + ","
for row in range(0, min(NSEEDS,len(ips)), 6):
print " " + ", ".join([ "0x%08x"%i for i in ips[row:row+6] ]) + ","

if __name__ == '__main__':
main()
2 changes: 1 addition & 1 deletion src/makefile.fbsd
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

ifneq ($(wildcard "/usr/local/lib/db48"), "")
ifeq ("$(wildcard /usr/local/lib/db48)", "")
BDB_LIB_PATH=/usr/local/lib/db5
BDB_INCLUDE_PATH=/usr/local/include/db5
else
Expand Down
28 changes: 18 additions & 10 deletions src/makefile.osx
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,25 @@
# Originally by Laszlo Hanyecz (solar@heliacal.net)

CXX=llvm-g++
DEPSDIR=/opt/local
ifeq ("$(shell port)", "") # homebrew
DEPSDIR=/usr/local
BDB_LIB_PATH=$(DEPSDIR)/Cellar/berkeley-db4/4.8.30/lib
BDB_INCLUDE_PATH=$(DEPSDIR)/Cellar/berkeley-db4/4.8.30/include
else # macports
DEPSDIR=/opt/local
BDB_LIB_PATH=$(DEPSDIR)/lib/db48
BDB_INCLUDE_PATH=$(DEPSDIR)/include/db48
endif

INCLUDEPATHS= \
-I"$(CURDIR)" \
-I"$(CURDIR)"/obj \
-I"$(DEPSDIR)/include" \
-I"$(DEPSDIR)/include/db48"
-I"$(BDB_INCLUDE_PATH)"

LIBPATHS= \
-L"$(DEPSDIR)/lib" \
-L"$(DEPSDIR)/lib/db48"
-L"$(BDB_LIB_PATH)"

USE_UPNP:=1
USE_IPV6:=1
Expand Down Expand Up @@ -72,7 +80,7 @@ CFLAGS += -stdlib=libstdc++

# ppc doesn't work because we don't support big-endian
CFLAGS += -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter \
$(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS)
$(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS) -Wno-deprecated

OBJS= \
leveldb/libleveldb.a \
Expand Down Expand Up @@ -130,10 +138,10 @@ ifneq (${USE_IPV6}, -)
DEFS += -DUSE_IPV6=$(USE_IPV6)
endif

all: litecoind
all: vertcoind

test check: test_litecoin FORCE
./test_litecoin
test check: test_vertcoin FORCE
./test_vertcoin

#
# LevelDB support
Expand Down Expand Up @@ -167,7 +175,7 @@ obj/%.o: %.cpp
-e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
rm -f $(@:%.o=%.d)

litecoind: $(OBJS:obj/%=obj/%)
vertcoind: $(OBJS:obj/%=obj/%)
$(CXX) $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)

TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp))
Expand All @@ -179,11 +187,11 @@ obj-test/%.o: test/%.cpp
-e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
rm -f $(@:%.o=%.d)

test_litecoin: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%))
test_vertcoin: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%))
$(CXX) $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) $(TESTLIBS)

clean:
-rm -f litecoind test_litecoin
-rm -f vertcoind test_vertcoin
-rm -f obj/*.o
-rm -f obj-test/*.o
-rm -f obj/*.P
Expand Down
1 change: 1 addition & 0 deletions src/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1186,6 +1186,7 @@ void MapPort(bool)
// The first name is used as information source for addrman.
// The second name should resolve to a list of seed addresses.
static const char *strMainNetDNSSeed[][2] = {
{"dnsseed.meningslos.info", "dnsseed.meningslos.info"},
{"ams1.vertcoin.org", "ams1.vertcoin.org"},
{"ams2.vertcoin.org", "ams2.vertcoin.org"},
{"ams3.vertcoin.org", "ams3.vertcoin.org"},
Expand Down
128 changes: 121 additions & 7 deletions src/test/scrypt_tests.cpp

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion vertcoin-qt.pro
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,10 @@ QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a; cd $$PWD/src/leveldb ; $(MAKE) cl
DEFINES += HAVE_BUILD_INFO
}

QMAKE_CXXFLAGS_WARN_ON = -fdiagnostics-show-option -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -Wstack-protector -Wno-deprecated
QMAKE_CXXFLAGS_WARN_ON = -fdiagnostics-show-option -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -Wstack-protector

macx:QMAKE_CXXFLAGS_WARN_ON += -Wno-deprecated


# Input
DEPENDPATH += src src/json src/qt
Expand Down

0 comments on commit 9128e90

Please sign in to comment.