PPCoin: Remove genesis block tool
authorSunny King <sunnyking9999@gmail.com>
Thu, 16 Aug 2012 19:30:01 +0000 (20:30 +0100)
committerSunny King <sunnyking9999@gmail.com>
Thu, 16 Aug 2012 19:30:01 +0000 (20:30 +0100)
src/init.cpp
src/makefile.unix
src/ppcoin/genesis.cpp [deleted file]
src/ppcoin/obj/.gitignore [deleted file]

index 62b6103..44e4f80 100644 (file)
@@ -106,7 +106,6 @@ void HandleSIGTERM(int)
 // Start
 //
 #if !defined(QT_GUI)
-#if !defined(PPCOIN_GENESIS)
 int main(int argc, char* argv[])
 {
     bool fRet = false;
@@ -118,7 +117,6 @@ int main(int argc, char* argv[])
     return 1;
 }
 #endif
-#endif
 
 bool AppInit(int argc, char* argv[])
 {
index a141d2b..1dd8fda 100644 (file)
@@ -144,21 +144,11 @@ test_ppcoin: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%))
        $(CXX) $(xCXXFLAGS) -o $@ $(LIBPATHS) $^ -Wl,-B$(LMODE) -lboost_unit_test_framework $(LDFLAGS) $(LIBS)
 
 clean:
-       -rm -f ppcoind test_ppcoin genesis
+       -rm -f ppcoind test_ppcoin
        -rm -f obj/*.o
        -rm -f obj-test/*.o
        -rm -f obj/*.P
        -rm -f obj-test/*.P
        -rm -f src/build.h
-       -rm -f ppcoin/obj/*
-
-ppcoin/obj/genesis.o: ppcoin/genesis.cpp
-       $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $<
-       $(CXX) -c $(xCXXFLAGS) -MMD -DPPCOIN_GENESIS -o obj/init.o init.cpp
-
-genesis: ppcoin/obj/genesis.o $(OBJS:obj/%=obj/%)
-       $(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)
-       -rm -f obj/init.*
-       -rm -f ppcoin/obj/genesis.*
 
 FORCE:
diff --git a/src/ppcoin/genesis.cpp b/src/ppcoin/genesis.cpp
deleted file mode 100644 (file)
index 36b0e4d..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) 2011 The PPCoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
-// file license.txt or http://www.opensource.org/licenses/mit-license.php.
-#include "../db.h"
-#include "../net.h"
-#include "../init.h"
-#include "../main.h"
-#include "../util.h"
-
-using namespace std;
-using namespace boost;
-
-int main(int argc, char *argv[])
-{
-    fPrintToConsole = true;
-    printf("PPCoin Begin Genesis Block\n");
-
-    // Genesis block
-    const char* pszTimestamp = "Matonis 07-AUG-2012 Parallel Currencies And The Roadmap To Monetary Freedom";
-    CTransaction txNew;
-    txNew.vin.resize(1);
-    txNew.vout.resize(1);
-    txNew.vin[0].scriptSig = CScript() << 486604799 << CBigNum(9999) << vector<unsigned char>((const unsigned char*)pszTimestamp, (const unsigned char*)pszTimestamp + strlen(pszTimestamp));
-    txNew.vout[0].SetEmpty();
-    txNew.nTime = 1345083810; // only for testnet
-    CBlock block;
-    block.vtx.push_back(txNew);
-    block.hashPrevBlock = 0;
-    block.hashMerkleRoot = block.BuildMerkleTree();
-    block.nVersion = 1;
-    block.nBits    = CBigNum(~uint256(0) >> 28).GetCompact(); //0x1d00ffff;
-    block.nTime    = 1345090000; //GetAdjustedTime();
-    block.nNonce   = 0;
-
-    CBigNum bnTarget;
-    bnTarget.SetCompact(block.nBits);
-
-    while (block.GetHash() > bnTarget.getuint256())
-    {
-        if ((block.nNonce >> 20) << 20 == block.nNonce)
-        {
-            //if (block.vtx[0].nTime + 7200 < GetAdjustedTime() + 60)
-            //{
-            //    block.vtx[0].nTime = GetAdjustedTime();
-            //    block.hashMerkleRoot = block.BuildMerkleTree();
-            //}
-            if (block.nNonce > 4000000000)
-            {
-                block.nTime++; // = GetAdjustedTime();
-                block.nNonce = 0;
-            }
-            printf("n=%dM hash=%s\n", block.nNonce >> 20,
-                   block.GetHash().ToString().c_str());
-        }
-        block.nNonce++;
-    }
-
-    printf("PPCoin Found Genesis Block:\n");
-    printf("genesis hash=%s\n", block.GetHash().ToString().c_str());
-    printf("merkle  root=%s\n", block.hashMerkleRoot.ToString().c_str());
-    block.print();
-
-    printf("PPCoin End Genesis Block\n");
-}
diff --git a/src/ppcoin/obj/.gitignore b/src/ppcoin/obj/.gitignore
deleted file mode 100644 (file)
index d6b7ef3..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-*
-!.gitignore