Skip to content

Commit

Permalink
first upload
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedbodi committed Aug 4, 2013
1 parent 2a99036 commit 41918cb
Show file tree
Hide file tree
Showing 70 changed files with 125 additions and 141 deletions.
Binary file added .DS_Store
Binary file not shown.
Binary file added ._.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion README
@@ -1,7 +1,7 @@

HoboNickels Crypto Tokens

Based on NVC/BitGems/bottlecaps
Based on NVC/BitGems/hobonickels
Proof of Work/Proof of Stake Hybrid
Scrypt
Linear Difficulty Retarget
Expand Down
18 changes: 9 additions & 9 deletions contrib/debian/examples/bitgem.conf
@@ -1,9 +1,9 @@
# BottleCaps.conf configuration file. Lines beginning with # are comments.
# HoboNickels.conf configuration file. Lines beginning with # are comments.


# Network-related settings:

# Run on the test network instead of the real BottleCaps network.
# Run on the test network instead of the real HoboNickels network.
#testnet=1

# Connect via a socks4 proxy
Expand All @@ -16,7 +16,7 @@
# to specific peers:
#connect=188.120.246.137:7777

# Do not use Internet Relay Chat (irc.lfnet.org #BottleCaps channel) to
# Do not use Internet Relay Chat (irc.lfnet.org #HoboNickels channel) to
# find other peers.
#noirc=1

Expand All @@ -26,7 +26,7 @@

# JSON-RPC options (for controlling a running process)

# server=1 tells BottleCaps to accept JSON-RPC commands.
# server=1 tells HoboNickels to accept JSON-RPC commands.
#server=1

# You must set rpcuser and rpcpassword to secure the JSON-RPC api
Expand All @@ -42,12 +42,12 @@
# Listen for RPC connections on this TCP port:
rpcport=8348

# You can use BottleCaps or BottleCapsd to send commands to Bitcoin/bitcoind BottleCaps/BottleCapsd
# You can use HoboNickels or HoboNickelsd to send commands to Bitcoin/bitcoind HoboNickels/HoboNickelsd
# running on another host using this option:
rpcconnect=127.0.0.1

# Use Secure Sockets Layer (also known as TLS or HTTPS) to communicate
# with BottleCaps -server or BottleCapsd
# with HoboNickels -server or HoboNickelsd
#rpcssl=1

# OpenSSL settings used when rpcssl=1
Expand All @@ -58,14 +58,14 @@ rpcsslprivatekeyfile=server.pem

# Miscellaneous options

# Set gen=1 to attempt to generate BottleCapss
# Set gen=1 to attempt to generate HoboNickelss
gen=0

# Pre-generate this many public/private key pairs, so wallet backups will be valid for
# both prior transactions and several dozen future transactions.
keypool=100

# Pay an optional transaction fee every time you send BottleCapss.
# Pay an optional transaction fee every time you send HoboNickelss.
paytxfee=0.01

# Allow direct connections for the 'pay via IP address' feature.
Expand All @@ -74,7 +74,7 @@ paytxfee=0.01

# User interface options

# Start BottleCaps minimized
# Start HoboNickels minimized
#min=1

# Minimize to the system tray
Expand Down
2 changes: 1 addition & 1 deletion share/pixmaps/bitgem32.xpm
@@ -1,5 +1,5 @@
/* XPM */
static char * BottleCaps32_xpm[] = {
static char * HoboNickels32_xpm[] = {
"32 32 433 2",
" c None",
". c #B28F63",
Expand Down
2 changes: 1 addition & 1 deletion share/pixmaps/bitgem80.xpm
@@ -1,5 +1,5 @@
/* XPM */
static char * BottleCaps80_xpm[] = {
static char * HoboNickels80_xpm[] = {
"81 80 872 2",
" c None",
". c #844E0D",
Expand Down
Binary file added src/.DS_Store
Binary file not shown.
Binary file added src/._.DS_Store
Binary file not shown.
Binary file added src/._bitcoinrpc.cpp
Binary file not shown.
Binary file added src/._checkpoints.cpp
Binary file not shown.
Binary file added src/._main.cpp
Binary file not shown.
Binary file added src/._main.h
Binary file not shown.
Binary file added src/._protocol.h
Binary file not shown.
Binary file added src/._version.cpp
Binary file not shown.
Binary file added src/._version.h
Binary file not shown.
6 changes: 3 additions & 3 deletions src/bitcoinrpc.cpp
Expand Up @@ -43,7 +43,7 @@ void ThreadRPCServer3(void* parg);

static inline unsigned short GetDefaultRPCPort()
{
return GetBoolArg("-testnet", false) ? 18385 : 8385;
return GetBoolArg("-testnet", false) ? 17373 : 7373;
}

Object JSONRPCError(int code, const string& message)
Expand Down Expand Up @@ -778,7 +778,7 @@ void ThreadRPCServer2(void* parg)
// Try a dual IPv6/IPv4 socket, falling back to separate IPv4 and IPv6 sockets
const bool loopback = !mapArgs.count("-rpcallowip");
asio::ip::address bindAddress = loopback ? asio::ip::address_v6::loopback() : asio::ip::address_v6::any();
ip::tcp::endpoint endpoint(bindAddress, GetArg("-rpcport", 7373()));
ip::tcp::endpoint endpoint(bindAddress, GetArg("-rpcport", GetDefaultRPCPort()));
boost::system::error_code v6_only_error;
boost::shared_ptr<ip::tcp::acceptor> acceptor(new ip::tcp::acceptor(io_service));

Expand Down Expand Up @@ -1071,7 +1071,7 @@ Object CallRPC(const string& strMethod, const Array& params)
asio::ssl::stream<asio::ip::tcp::socket> sslStream(io_service, context);
SSLIOStreamDevice<asio::ip::tcp> d(sslStream, fUseSSL);
iostreams::stream< SSLIOStreamDevice<asio::ip::tcp> > stream(d);
if (!d.connect(GetArg("-rpcconnect", "127.0.0.1"), GetArg("-rpcport", itostr("7373"()))))
if (!d.connect(GetArg("-rpcconnect", "127.0.0.1"), GetArg("-rpcport", itostr(GetDefaultRPCPort()))))
throw runtime_error("couldn't connect to server");

// HTTP basic authentication
Expand Down
16 changes: 0 additions & 16 deletions src/checkpoints.cpp
Expand Up @@ -25,22 +25,6 @@ namespace Checkpoints
static MapCheckpoints mapCheckpoints =
boost::assign::map_list_of
( 0, hashGenesisBlockOfficial )
( 1, uint256("0x000000022915d0f1ba9fc667bd5169769e4c3861b17fbf006882fcc984e52f55"))
( 2, uint256("0x000000037df7e65a33cb71af12e7b3420351218e841f7a1721a10a70e6bfe90b"))
( 100, uint256("0x0000000283a951c532ed00b72f5e0cc71ca7c40ad1f5e8513c35464bf680065e"))
( 500, uint256("0x000000012140f9b59df468990eb4777d742980cd09b0d3ce306b2e8a1f0956c7"))
( 1000, uint256("0x000000006a708119b555c4ade596252150f9a4864e72899c864cfa59585531cd"))
( 5000, uint256("0x000000007b723ca7d2fac04a5ed6d955e549dd5dec4c95a630599c4ce7907785"))
( 10000, uint256("0x00000000bdc6d74910a85d92c5adc706ddd74987ad1886b73bcfe499708c43b1"))
( 12500, uint256("0x0000000034135a89e021b4eb8f3875533f19c5c89663b37c09db5ad82fcaece5"))
( 13500, uint256("0x000000007fde749673e61358caa14480efb9a8b31473c4feae70e0668090e897"))
( 15000, uint256("0x000000012588d29dc504ded9c053dfa10976ccd6ddcdb865f610ae469fad7d9b"))
( 17500, uint256("0x00000000a432bb28b34e54dabbbf7e6985fbf9f6cf6f434b14d2782c475942f9"))
( 20000, uint256("0x00000000a8335868da43bf0c7d73ca9faa97d14fc51f33a443d8091374b8bebb"))
( 21450, uint256("0x000000004b571d9bc6a998bf0ed6f0ef1b3eb4fc29473ad756e6f56aaf47baff"))
( 25000, uint256("0x000000000f06e54b9fc97ada38c622b15f6c81883f6621bef512d0afe94ba369"))
( 29000, uint256("0x0000000000cbc8f999b00076353efdf37cff14a00322331ee0afb8bbf4ef2466"))
( 31350, uint256("0x000000006c7b043c45bf4621e42b6614dd614911b4af7baff8e61d4c6e2e644b"))
;

static MapCheckpoints mapCheckpointsTestnet =
Expand Down
Binary file added src/hobonickelsd
Binary file not shown.
14 changes: 7 additions & 7 deletions src/main.cpp
Expand Up @@ -33,7 +33,7 @@ unsigned int nTransactionsUpdated = 0;
map<uint256, CBlockIndex*> mapBlockIndex;
set<pair<COutPoint, unsigned int> > setStakeSeen;
uint256 hashGenesisBlock = hashGenesisBlockOfficial;
static CBigNum bnProofOfWorkLimit(~uint256(0) >> 30);
static CBigNum bnProofOfWorkLimit(~uint256(0) >> 20);
static CBigNum bnProofOfStakeLimit(~uint256(0) >> 24);
static CBigNum bnProofOfStakeHardLimit(~uint256(0) >> 30); // disabled temporarily, will be used in the future to fix minimum PoS difficulty at 0.25

Expand Down Expand Up @@ -941,7 +941,7 @@ int64 GetProofOfWorkReward(unsigned int nHeight)
{
int64 nSubsidy = 5 * COIN;


return nSubsidy;
}

// miner's coin stake reward based on nBits and coin age spent (coin-days)
Expand Down Expand Up @@ -2515,7 +2515,7 @@ bool LoadBlockIndex(bool fAllowNew)
// CTxOut(empty)
//vMerkleTree: ea6fed5e2
// Genesis block
const char* pszTimestamp = "Jun 22, 2013 9:47am EDT. The United States has filed espionage charges against Edward Snowden";
const char* pszTimestamp = "HoboNickels are Go!";
CTransaction txNew;
txNew.nTime = nChainStartTime;
txNew.vin.resize(1);
Expand All @@ -2527,11 +2527,11 @@ bool LoadBlockIndex(bool fAllowNew)
block.hashPrevBlock = 0;
block.hashMerkleRoot = block.BuildMerkleTree();
block.nVersion = 1;
block.nTime = 1374028434;
block.nTime = 1374635824;
block.nBits = bnProofOfWorkLimit.GetCompact();
block.nNonce = 3858650;
block.nNonce = 4215582;

if (false && (block.GetHash() != hashGenesisBlock)) {
if (true && (block.GetHash() != hashGenesisBlock)) {

// This will figure out a valid hash and Nonce if you're
// creating a different genesis block:
Expand All @@ -2555,7 +2555,7 @@ bool LoadBlockIndex(bool fAllowNew)
printf("block.nTime = %u \n", block.nTime);
printf("block.nNonce = %u \n", block.nNonce);

assert(block.hashMerkleRoot == uint256("0x42eda43959f2726e4ea033cab3af3c86d04cee4d5e736760387ba7dae87093ac"));
assert(block.hashMerkleRoot == uint256("0xbe06386a1644f7448ff25d28862b6c28e3a334e4a58f1c5ebd99ee49daa370c7"));

assert(block.GetHash() == hashGenesisBlock);

Expand Down
2 changes: 1 addition & 1 deletion src/main.h
Expand Up @@ -52,7 +52,7 @@ static const int fHaveUPnP = true;
static const int fHaveUPnP = false;
#endif

static const uint256 hashGenesisBlockOfficial("0xb70be2c6d7f6dfbb7cc874a6009b14e267b0e0ecb2e725152dd785829216dadd");
static const uint256 hashGenesisBlockOfficial("0x000009ea5ef5019446b315e7e581fc2ea184315ed46c9ddeadc8aa9442deedc9");
static const uint256 hashGenesisBlockTestNet("0x");

static const int64 nMaxClockDrift = 2 * 60 * 60; // two hours
Expand Down
12 changes: 6 additions & 6 deletions src/makefile.osx
Expand Up @@ -119,10 +119,10 @@ ifneq (${USE_IPV6}, -)
DEFS += -DUSE_IPV6=$(USE_IPV6)
endif

all: bottlecapsd
all: hobonickelsd

test check: test_bottlecaps FORCE
./test_bottlecaps
test check: test_hobonickels FORCE
./test_hobonickels

# auto-generated dependencies:
-include obj/*.P
Expand All @@ -146,7 +146,7 @@ obj/scrypt-x86.o: scrypt-x86.S
obj/scrypt-x86_64.o: scrypt-x86_64.S
$(CXX) -c $(xCXXFLAGS) -MMD -o $@ $<

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

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

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

clean:
-rm -f bottlecapsd test_bottlecaps
-rm -f hobonickelsd test_hobonickels
-rm -f obj/*.o
-rm -f obj-test/*.o
-rm -f obj/*.P
Expand Down
12 changes: 6 additions & 6 deletions src/makefile.unix
Expand Up @@ -135,10 +135,10 @@ OBJS= \
obj/scrypt-x86_64.o


all: bottlecapsd
all: hobonickelsd

test check: test_bottlecaps FORCE
./test_bottlecaps
test check: test_hobonickels FORCE
./test_hobonickels

# auto-generated dependencies:
-include obj/*.P
Expand All @@ -162,7 +162,7 @@ obj/%.o: %.cpp
-e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
rm -f $(@:%.o=%.d)

bottlecapsd: $(OBJS:obj/%=obj/%)
hobonickelsd: $(OBJS:obj/%=obj/%)
$(LINK) $(xCXXFLAGS) -o $@ $^ $(xLDFLAGS) $(LIBS)

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

test_bottlecaps: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%))
test_hobonickels: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%))
$(LINK) $(xCXXFLAGS) -o $@ $(LIBPATHS) $^ -Wl,-B$(LMODE) -lboost_unit_test_framework $(xLDFLAGS) $(LIBS)

clean:
-rm -f bottlecapsd test_bottlecaps
-rm -f hobonickelsd test_hobonickels
-rm -f obj/*.o
-rm -f obj-test/*.o
-rm -f obj/*.P
Expand Down
2 changes: 1 addition & 1 deletion src/protocol.h
Expand Up @@ -18,7 +18,7 @@
extern bool fTestNet;
static inline unsigned short GetDefaultPort(const bool testnet = fTestNet)
{
return testnet ? 7374 : 7372;
return testnet ? 17372 : 7372;
}


Expand Down
Binary file added src/qt/.DS_Store
Binary file not shown.
Binary file added src/qt/._.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion src/qt/askpassphrasedialog.cpp~~
Expand Up @@ -109,7 +109,7 @@ void AskPassphraseDialog::accept()
{
QMessageBox::warning(this, tr("Wallet encrypted"),
"<qt>" +
tr("BottleCaps will close now to finish the encryption process. "
tr("HoboNickels will close now to finish the encryption process. "
"Remember that encrypting your wallet cannot fully protect "
"your coins from being stolen by malware infecting your computer.") +
"<br><br><b>" +
Expand Down
12 changes: 6 additions & 6 deletions src/qt/bitcoin.cpp~
Expand Up @@ -106,7 +106,7 @@ static std::string Translate(const char* psz)
static void handleRunawayException(std::exception *e)
{
PrintExceptionContinue(e, "Runaway exception");
QMessageBox::critical(0, "Runaway exception", BitcoinGUI::tr("A fatal error occurred. BottleCaps can no longer continue safely and will quit.") + QString("\n\n") + QString::fromStdString(strMiscWarning));
QMessageBox::critical(0, "Runaway exception", BitcoinGUI::tr("A fatal error occurred. HoboNickels can no longer continue safely and will quit.") + QString("\n\n") + QString::fromStdString(strMiscWarning));
exit(1);
}

Expand Down Expand Up @@ -134,20 +134,20 @@ int main(int argc, char *argv[])
{
// This message can not be translated, as translation is not initialized yet
// (which not yet possible because lang=XX can be overridden in bitcoin.conf in the data directory)
QMessageBox::critical(0, "BottleCaps",
QMessageBox::critical(0, "HoboNickels",
QString("Error: Specified data directory \"%1\" does not exist.").arg(QString::fromStdString(mapArgs["-datadir"])));
return 1;
}
ReadConfigFile(mapArgs, mapMultiArgs);

// Application identification (must be set before OptionsModel is initialized,
// as it is used to locate QSettings)
app.setOrganizationName("BottleCaps");
app.setOrganizationDomain("BottleCaps.su");
app.setOrganizationName("HoboNickels");
app.setOrganizationDomain("HoboNickels.su");
if(GetBoolArg("-testnet")) // Separate UI settings for testnet
app.setApplicationName("BottleCaps-Qt-testnet");
app.setApplicationName("HoboNickels-Qt-testnet");
else
app.setApplicationName("BottleCaps-Qt");
app.setApplicationName("HoboNickels-Qt");

// ... then GUI settings:
OptionsModel optionsModel;
Expand Down
8 changes: 4 additions & 4 deletions src/qt/bitcoin.qrc~
@@ -1,10 +1,10 @@
<RCC>
<qresource prefix="/icons">
<file alias="bitcoin">res/icons/BottleCaps-128.png</file>
<file alias="bitcoin">res/icons/HoboNickels-128.png</file>
<file alias="address-book">res/icons/address-book.png</file>
<file alias="quit">res/icons/quit.png</file>
<file alias="send">res/icons/send.png</file>
<file alias="toolbar">res/icons/BottleCaps-16.png</file>
<file alias="toolbar">res/icons/HoboNickels-16.png</file>
<file alias="connect_0">res/icons/connect0_16.png</file>
<file alias="connect_1">res/icons/connect1_16.png</file>
<file alias="connect_2">res/icons/connect2_16.png</file>
Expand All @@ -22,8 +22,8 @@
<file alias="editpaste">res/icons/editpaste.png</file>
<file alias="editcopy">res/icons/editcopy.png</file>
<file alias="add">res/icons/add.png</file>
<file alias="bitcoin_testnet">res/icons/BottleCaps-128.png</file>
<file alias="toolbar_testnet">res/icons/BottleCaps-16.png</file>
<file alias="bitcoin_testnet">res/icons/HoboNickels-128.png</file>
<file alias="toolbar_testnet">res/icons/HoboNickels-16.png</file>
<file alias="edit">res/icons/edit.png</file>
<file alias="history">res/icons/history.png</file>
<file alias="overview">res/icons/overview.png</file>
Expand Down

0 comments on commit 41918cb

Please sign in to comment.