Skip to content

Commit

Permalink
Add support for Jumbucks
Browse files Browse the repository at this point in the history
  • Loading branch information
jyap808 committed Jan 13, 2015
1 parent 3294d0b commit eb67030
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ INC = \
#-DCLAM \
#-DBITCOIN \
#-DDARKCOIN \
#-DJUMBUCKS \
#-DLITECOIN \
#-DPEERCOIN \
#-DFEDORACOIN \
Expand Down
12 changes: 10 additions & 2 deletions parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ static uint256_t gNullHash;
static const uint32_t gExpectedMagic = 0x15352203;
#endif

#if defined JUMBUCKS
static const size_t gHeaderSize = 80;
static auto gCoinDirName = "/.coinmarketscoin/";
static const uint32_t gExpectedMagic = 0xb6f1f4fc;
#endif

#define DO(x) x
static inline void startBlock(const uint8_t *p) { DO(gCallback->startBlock(p)); }
static inline void endBlock(const uint8_t *p) { DO(gCallback->endBlock(p)); }
Expand Down Expand Up @@ -330,7 +336,7 @@ static void parseTX(
SKIP(uint32_t, nVersion, p);
#endif

#if defined(PEERCOIN) || defined(CLAM)
#if defined(PEERCOIN) || defined(CLAM) || defined(JUMBUCKS)
SKIP(uint32_t, nTime, p);
#endif

Expand Down Expand Up @@ -396,7 +402,7 @@ static void parseBlock(
}
endTXs(p);

#if defined(PEERCOIN) || defined(CLAM)
#if defined(PEERCOIN) || defined(CLAM) || defined(JUMBUCKS)
LOAD_VARINT(vchBlockSigSize, p);
p += vchBlockSigSize;
#endif
Expand Down Expand Up @@ -616,6 +622,8 @@ static void getBlockHeader(
} else {
scrypt(hash, p, gHeaderSize);
}
#elif defined(JUMBUCKS)
scrypt(hash, p, gHeaderSize);
#else
sha256Twice(hash, p, gHeaderSize);
#endif
Expand Down
10 changes: 9 additions & 1 deletion util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,10 @@ bool addrToHash160(
data[0] = 137;
#endif

#if defined(JUMBUCKS)
data[0] = 43;
#endif

#if defined(DOGECOIN)
data[0] = 30;
#endif
Expand Down Expand Up @@ -781,6 +785,10 @@ const char *getInterestingAddr() {

"xQKq1LwJQQkg1A5cmB9znGozCKLkAaKJHW"

#elif defined(JUMBUCKS)

"JhbrvAmM7kNpwA6wD5KoAsbtikLWWMNPcM"

#else

fatal("no address specified")
Expand All @@ -807,7 +815,7 @@ const char *getInterestingAddr() {

#endif

#if defined CLAM
#if defined(CLAM) || defined(JUMBUCKS)

#include <scrypt/scrypt.h>

Expand Down
6 changes: 5 additions & 1 deletion util.h
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@
);
#endif

#if defined(CLAM)
#if defined(CLAM) || defined(JUMBUCKS)
void scrypt(
uint8_t *h9r,
const uint8_t *buf,
Expand Down Expand Up @@ -363,6 +363,10 @@
uint8_t type = 137
#endif

#if defined(JUMBUCKS)
uint8_t type = 43
#endif

#if defined(DOGECOIN)
uint8_t type = 30
#endif
Expand Down

0 comments on commit eb67030

Please sign in to comment.