Pages:
Author

Topic: Should SatoshiRoulette.com add PPC support (Read 2979 times)

sr. member
Activity: 364
Merit: 252
October 19, 2012, 04:11:45 AM
#30
At least you admit it but you still get a face palm...

Not everyone shares my cheeky of humor I guess  Smiley

Seems like a scam to me.

I do not at all like dishonest people.



I think your English skills fail you Chaang.
You are mis-using the definition of scam and I am nor am or have been dishonest.
I have reverted it back the polls to avoid further confusing you.

What you fail to appreciate is the no votes have no bearing on the decision because key members of the PPC community contacted me specifically requesting addition.
You and others voting no had no influence on the decision made, the only votes we were interested in is Yes votes, hence 1 no and 2 joke polls.
vip
Activity: 840
Merit: 1000
October 19, 2012, 02:18:45 AM
#29
At least you admit it but you still get a face palm...

Not everyone shares my cheeky of humor I guess  Smiley

Seems like a scam to me.

I do not at all like dishonest people.

sr. member
Activity: 364
Merit: 252
October 19, 2012, 01:07:55 AM
#28
At least you admit it but you still get a face palm...

Not everyone shares my cheeky of humor I guess  Smiley
vip
Activity: 840
Merit: 1000
October 18, 2012, 11:38:13 PM
#27
you edited the poll after people voted to give you the results you were looking for?

We edited it for laughs, pray we do not edit it any further.

But seriously We were after an expression of interest and hopefully some feedback on why it may not be welcome just now (as we did with Devcoin). As all nay sayers no failed to back up their position, their votes from out perspective is irrelevant.

No == Yes of Course Wink

Have you ever considered that you might be wasting your time with all this PPCoin implementation stuff?

I actually think you have a pretty good idea going and have been doing a good job in general with your website. You seem to have found a nice niche between bare bones SatoshiDice style send-and-done style gambling and standard online casino style gambling.

You have implemented many new games at a good pace, but I think your site could still improve a lot. It could use some polish, and if I remember correctly there seemed to be a decent amount of typos and such.

I really think there is tons of potential for your site. The bitcoin gaming market is really young and surprisingly weak considering bitcoin completely solves the payment processing issue.

Anyway, good luck with your site and keep up the good work.

Each alt currency has proved quite valuable in testing and developing our engine.
So from a development POV yes it really is worth supporting or at least privately testing an alt currency with our engine.

Thanks for the really positive feed back and yes "between bare bones SatoshiDice style send-and-done style gambling and standard online casino style gambling" is our business plan to a tee Cheesy

We still have a long way to go but these past 3 months have been an Excellent Adventure and we intend to keep increasing the site appearance and game offerings.


you edited the poll after people voted to give you the results you were looking for?

Really? Any proof? I wasn't paying attention to this PISS thread.

Proof == Yes we did Tongue

We changed no votes to a 2nd yes.

At least you admit it but you still get a face palm...
sr. member
Activity: 364
Merit: 252
October 18, 2012, 09:37:34 PM
#26
you edited the poll after people voted to give you the results you were looking for?

We edited it for laughs, pray we do not edit it any further.

But seriously We were after an expression of interest and hopefully some feedback on why it may not be welcome just now (as we did with Devcoin). As all nay sayers no failed to back up their position, their votes from out perspective is irrelevant.

No == Yes of Course Wink

Have you ever considered that you might be wasting your time with all this PPCoin implementation stuff?

I actually think you have a pretty good idea going and have been doing a good job in general with your website. You seem to have found a nice niche between bare bones SatoshiDice style send-and-done style gambling and standard online casino style gambling.

You have implemented many new games at a good pace, but I think your site could still improve a lot. It could use some polish, and if I remember correctly there seemed to be a decent amount of typos and such.

I really think there is tons of potential for your site. The bitcoin gaming market is really young and surprisingly weak considering bitcoin completely solves the payment processing issue.

Anyway, good luck with your site and keep up the good work.

Each alt currency has proved quite valuable in testing and developing our engine.
So from a development POV yes it really is worth supporting or at least privately testing an alt currency with our engine.

Thanks for the really positive feed back and yes "between bare bones SatoshiDice style send-and-done style gambling and standard online casino style gambling" is our business plan to a tee Cheesy

We still have a long way to go but these past 3 months have been an Excellent Adventure and we intend to keep increasing the site appearance and game offerings.


you edited the poll after people voted to give you the results you were looking for?

Really? Any proof? I wasn't paying attention to this PISS thread.

Proof == Yes we did Tongue

We changed no votes to a 2nd yes.
legendary
Activity: 2492
Merit: 1473
LEALANA Bitcoin Grim Reaper
October 18, 2012, 06:27:23 PM
#25
you edited the poll after people voted to give you the results you were looking for?

Really? Any proof? I wasn't paying attention to this PISS thread.
legendary
Activity: 826
Merit: 1000
amarha
October 18, 2012, 02:11:01 PM
#24
Have you ever considered that you might be wasting your time with all this PPCoin implementation stuff?

I actually think you have a pretty good idea going and have been doing a good job in general with your website. You seem to have found a nice niche between bare bones SatoshiDice style send-and-done style gambling and standard online casino style gambling.

You have implemented many new games at a good pace, but I think your site could still improve a lot. It could use some polish, and if I remember correctly there seemed to be a decent amount of typos and such.

I really think there is tons of potential for your site. The bitcoin gaming market is really young and surprisingly weak considering bitcoin completely solves the payment processing issue.

Anyway, good luck with your site and keep up the good work.
sr. member
Activity: 288
Merit: 250
October 18, 2012, 12:27:35 PM
#23
you edited the poll after people voted to give you the results you were looking for?
Sure looks like it ... Roll Eyes
vip
Activity: 840
Merit: 1000
October 18, 2012, 11:40:02 AM
#22
you edited the poll after people voted to give you the results you were looking for?
hero member
Activity: 826
Merit: 500
Crypto Somnium
October 13, 2012, 06:06:07 AM
#21
i will help test
legendary
Activity: 2492
Merit: 1473
LEALANA Bitcoin Grim Reaper
October 13, 2012, 05:33:40 AM
#20
I wouldn't support anything that even reminds me of RealSolidShit ...AKA Sunny Drag Queen.  Cheesy
sr. member
Activity: 364
Merit: 252
October 12, 2012, 11:32:50 PM
#19
legendary
Activity: 1204
Merit: 1002
RUM AND CARROTS: A PIRATE LIFE FOR ME
October 12, 2012, 08:53:07 PM
#18
personally I hope not, but what the heck.
sr. member
Activity: 448
Merit: 250
October 12, 2012, 05:18:09 PM
#17
sr. member
Activity: 364
Merit: 252
October 12, 2012, 03:00:50 PM
#16
legendary
Activity: 1064
Merit: 1000
October 12, 2012, 01:58:11 PM
#15
Dammit, this was on my TODO list  Cry

Oh well, guess I really would not have the time considering the project I am working on now for PPC.

I always liked the Roulette game and Dice is just a classic. I would say start with those two.  Smiley

I would say bet ranges should be the PPC value equivalent of BTC bet ranges.



What project are you working on out of interest ?

Everything about my current PPC projects will be in this thread for now:

https://bitcointalksearch.org/topic/locked-ppc-block-explorer-please-use-the-new-cryptocoinexplorer-thread-112972

Once the GUI client hits a stage where it can be beta tested, I will create a new thread for it.
sr. member
Activity: 448
Merit: 250
October 12, 2012, 01:42:18 PM
#14
Code Monkey:
Quote
unfortunately the current version of ppcoind does not support the rpc command getrawtranasction

As has been explained to me, with that feature missing we cannot support ppcoin at this time with our engine, but we now have games and ppcoins ready for when it is supported.

Hi

Here's a patch for getrawtransaction.

Next release will be forked from bitcoin 0.7.0 as I understand so no patch will be required.

Andy


Code:
diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp
index 3c39a30..adaedae 100644
--- a/src/bitcoinrpc.cpp
+++ b/src/bitcoinrpc.cpp
@@ -21,7 +21,7 @@
 #include
 #include
 #include
-#include
+#include
 #include
 typedef boost::asio::ssl::stream SSLStream;
 
@@ -113,6 +113,33 @@ HexBits(unsigned int nBits)
     return HexStr(BEGIN(uBits.cBits), END(uBits.cBits));
 }
 
+void ScriptPubKeyToJSON(const CScript& scriptPubKey, Object& out)
+{
+    txnouttype type;
+    //vector addresses;
+    vector addresses;
+    int nRequired;
+
+    out.push_back(Pair("asm", scriptPubKey.ToString()));
+    out.push_back(Pair("hex", HexStr(scriptPubKey.begin(), scriptPubKey.end())));
+
+    ExtractAddresses(scriptPubKey, type, addresses, nRequired);
+    /**if (!ExtractDestinations(scriptPubKey, type, addresses, nRequired))
+    {
+        out.push_back(Pair("type", GetTxnOutputType(TX_NONSTANDARD)));
+        return;
+    }**/
+
+    out.push_back(Pair("reqSigs", nRequired));
+    out.push_back(Pair("type", GetTxnOutputType(type)));
+
+    Array a;
+    BOOST_FOREACH(const CBitcoinAddress& addr, addresses)
+        a.push_back(addr.ToString());
+    out.push_back(Pair("addresses", a));
+
+}
+
 void WalletTxToJSON(const CWalletTx& wtx, Object& entry)
 {
     int confirms = wtx.GetDepthInMainChain();
@@ -172,6 +199,63 @@ Object blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool fPri
     return result;
 }
 
+void TxToJSON(const CTransaction& tx, const uint256 hashBlock, Object& entry)
+{
+    entry.push_back(Pair("txid", tx.GetHash().GetHex()));
+    entry.push_back(Pair("version", tx.nVersion));
+    entry.push_back(Pair("locktime", (boost::int64_t)tx.nLockTime));
+    Array vin;
+    BOOST_FOREACH(const CTxIn& txin, tx.vin)
+    {
+        Object in;
+        if (tx.IsCoinBase())
+            in.push_back(Pair("coinbase", HexStr(txin.scriptSig.begin(), txin.scriptSig.end())));
+        else
+        {
+            in.push_back(Pair("txid", txin.prevout.hash.GetHex()));
+            in.push_back(Pair("vout", (boost::int64_t)txin.prevout.n));
+            Object o;
+            o.push_back(Pair("asm", txin.scriptSig.ToString()));
+            o.push_back(Pair("hex", HexStr(txin.scriptSig.begin(), txin.scriptSig.end())));
+            in.push_back(Pair("scriptSig", o));
+        }
+        in.push_back(Pair("sequence", (boost::int64_t)txin.nSequence));
+        vin.push_back(in);
+    }
+    entry.push_back(Pair("vin", vin));
+    Array vout;
+    for (unsigned int i = 0; i < tx.vout.size(); i++)
+    {
+        const CTxOut& txout = tx.vout[i];
+        Object out;
+        out.push_back(Pair("value", ValueFromAmount(txout.nValue)));
+        out.push_back(Pair("n", (boost::int64_t)i));
+        Object o;
+        ScriptPubKeyToJSON(txout.scriptPubKey, o);
+        out.push_back(Pair("scriptPubKey", o));
+        vout.push_back(out);
+    }
+    entry.push_back(Pair("vout", vout));
+
+    if (hashBlock != 0)
+    {
+        entry.push_back(Pair("blockhash", hashBlock.GetHex()));
+        map::iterator mi = mapBlockIndex.find(hashBlock);
+        if (mi != mapBlockIndex.end() && (*mi).second)
+        {
+            CBlockIndex* pindex = (*mi).second;
+            if (pindex->IsInMainChain())
+            {
+                entry.push_back(Pair("confirmations", 1 + nBestHeight - pindex->nHeight));
+                entry.push_back(Pair("time", (boost::int64_t)pindex->nTime));
+                entry.push_back(Pair("blocktime", (boost::int64_t)pindex->nTime));
+            }
+            else
+                entry.push_back(Pair("confirmations", 0));
+        }
+     }
+  }
+
 
 
 ///
@@ -425,6 +509,133 @@ Value getnewaddress(const Array& params, bool fHelp)
 }
 
 
+Value getrawtransaction(const Array& params, bool fHelp) {
+ if (fHelp || params.size() < 1 || params.size() > 2)
+        throw runtime_error(
+            "getrawtransaction [verbose=0]\n"
+            "If verbose=0, returns a string that is "
+            "serialized, hex-encoded data for . "
+            "If verbose is non-zero, returns an Object "
+            "with information about .");
+
+ uint256 hash;
+ hash.SetHex(params[0].get_str());
+ bool fVerbose = false;
+ if (params.size() > 1) fVerbose = (params[1].get_int() != 0);
+
+ CTransaction tx;
+ uint256 hashBlock = 0; //Block which contained the tx.
+ if (!GetTransaction(hash, tx, hashBlock))
+    throw JSONRPCError(-5, "No information available about transaction");
+
+  CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
+    ssTx << tx;
+    string strHex = HexStr(ssTx.begin(), ssTx.end());
+
+    if (!fVerbose)
+        return strHex;
+
+    Object result;
+    result.push_back(Pair("hex", strHex));
+    //TxToJSON(tx, hashBlock, result);
+    return result;
+}
+
+Value listunspent(const Array& params, bool fHelp)
+{
+    if (fHelp || params.size() > 3)
+        throw runtime_error(
+            "listunspent [minconf=1] [maxconf=9999999]  [\"address\",...]\n"
+            "Returns array of unspent transaction outputs\n"
+            "with between minconf and maxconf (inclusive) confirmations.\n"
+            "Optionally filtered to only include txouts paid to specified addresses.\n"
+            "Results are an array of Objects, each of which has:\n"
+            "{txid, vout, scriptPubKey, amount, confirmations}");
+
+  Object result;
+  return result;
+}
+
+Value createrawtransaction(const Array& params, bool fHelp)
+{
+    if (fHelp || params.size() != 2)
+        throw runtime_error(
+            "createrawtransaction [{\"txid\":txid,\"vout\":n},...] {address:amount,...}\n"
+            "Create a transaction spending given inputs\n"
+            "(array of objects containing transaction id and output number),\n"
+            "sending to given address(es).\n"
+            "Returns hex-encoded raw transaction.\n"
+            "Note that the transaction's inputs are not signed, and\n"
+            "it is not stored in the wallet or transmitted to the network.");
+
+   Object result;
+   return result;
+}
+
+Value signrawtransaction(const Array& params, bool fHelp)
+{
+    if (fHelp || params.size() < 1 || params.size() > 4)
+        throw runtime_error(
+            "signrawtransaction [{\"txid\":txid,\"vout\":n,\"scriptPubKey\":hex},...] [,...] [sighashtype=\"ALL\"]\n"
+            "Sign inputs for raw transaction (serialized, hex-encoded).\n"
+            "Second optional argument (may be null) is an array of previous transaction outputs that\n"
+            "this transaction depends on but may not yet be in the blockchain.\n"
+            "Third optional argument (may be null) is an array of base58-encoded private\n"
+            "keys that, if given, will be the only keys used to sign the transaction.\n"
+            "Fourth optional argument is a string that is one of six values; ALL, NONE, SINGLE or\n"
+            "ALL|ANYONECANPAY, NONE|ANYONECANPAY, SINGLE|ANYONECANPAY.\n"
+            "Returns json object with keys:\n"
+            "  hex : raw transaction with signature(s) (hex-encoded string)\n"
+            "  complete : 1 if transaction has a complete set of signature (0 if not)"
+            "UPDATE ME");
+
+
+    Object result;
+
+    return result;
+}
+
+Value sendrawtransaction(const Array& params, bool fHelp)
+{
+    if (fHelp || params.size() < 1 || params.size() > 1)
+        throw runtime_error(
+            "sendrawtransaction \n"
+            "Submits raw transaction (serialized, hex-encoded) to local node and network.");
+  Object result;
+
+  return result;
+}
+
+Value decoderawtransaction(const Array& params, bool fHelp)
+{
+  if (fHelp || params.size() != 1)
+        throw runtime_error(
+            "decoderawtransaction \n"
+            "Return a JSON object representing the serialized, hex-encoded transaction.");
+   //RPCTypeCheck(params, list_of(str_type));
+
+    vector txData(ParseHex(params[0].get_str()));
+    CDataStream ssData(txData, SER_NETWORK, PROTOCOL_VERSION);
+    CTransaction tx;
+    try {
+        ssData >> tx;
+    }
+    catch (std::exception &e) {
+        throw JSONRPCError(-22, "TX decode failed");
+    }
+
+    Object result;
+    TxToJSON(tx, 0, result);
+
+    return result;
+
+
+}
+
+
+
+
+
 CBitcoinAddress GetAccountAddress(string strAccount, bool bForceNew=false)
 {
     CWalletDB walletdb(pwalletMain->strWalletFile);
@@ -976,7 +1187,7 @@ Value sendmany(const Array& params, bool fHelp)
 
         CScript scriptPubKey;
         scriptPubKey.SetBitcoinAddress(address);
-        int64 nAmount = AmountFromValue(s.value_);
+        int64 nAmount = AmountFromValue(s.value_);
         if (nAmount < MIN_TXOUT_AMOUNT)
             throw JSONRPCError(-101, "Send amount too small");
         totalAmount += nAmount;
@@ -1361,7 +1572,7 @@ Value listtransactions(const Array& params, bool fHelp)
         if (ret.size() >= (nCount+nFrom)) break;
     }
     // ret is newest to oldest
-   
+
     if (nFrom > (int)ret.size())
         nFrom = ret.size();
     if ((nFrom + nCount) > (int)ret.size())
@@ -2043,9 +2254,9 @@ Value getcheckpoint(const Array& params, bool fHelp)
 
     Object result;
     CBlockIndex* pindexCheckpoint;
-   
+
     result.push_back(Pair("synccheckpoint", Checkpoints::hashSyncCheckpoint.ToString().c_str()));
-    pindexCheckpoint = mapBlockIndex[Checkpoints::hashSyncCheckpoint];       
+    pindexCheckpoint = mapBlockIndex[Checkpoints::hashSyncCheckpoint];
     result.push_back(Pair("height", pindexCheckpoint->nHeight));
     result.push_back(Pair("timestamp", DateTimeStrFormat(pindexCheckpoint->GetBlockTime()).c_str()));
     if (mapArgs.count("-checkpointkey"))
@@ -2154,7 +2365,7 @@ Value makekeypair(const Array& params, bool fHelp)
     string strPrefix = "";
     if (params.size() > 0)
         strPrefix = params[0].get_str();
-
+
     CKey key;
     int nCount = 0;
     do
@@ -2176,7 +2387,7 @@ Value makekeypair(const Array& params, bool fHelp)
 extern CCriticalSection cs_mapAlerts;
 extern map mapAlerts;
 
-// ppcoin: send alert. 
+// ppcoin: send alert.
 // There is a known deadlock situation with ThreadMessageHandler
 // ThreadMessageHandler: holds cs_vSend and acquiring cs_main in SendMessages()
 // ThreadRPCServer: holds cs_main and acquiring cs_vSend in alert.RelayTo()/PushMessage()/BeginMessage()
@@ -2211,13 +2422,13 @@ Value sendalert(const Array& params, bool fHelp)
     CDataStream sMsg(SER_NETWORK, PROTOCOL_VERSION);
     sMsg << (CUnsignedAlert)alert;
     alert.vchMsg = vector(sMsg.begin(), sMsg.end());
-   
+
     vector vchPrivKey = ParseHex(params[1].get_str());
     key.SetPrivKey(CPrivKey(vchPrivKey.begin(), vchPrivKey.end())); // if key is not correct openssl may crash
     if (!key.Sign(Hash(alert.vchMsg.begin(), alert.vchMsg.end()), alert.vchSig))
         throw runtime_error(
-            "Unable to sign alert, check private key?\n"); 
-    if(!alert.ProcessAlert())
+            "Unable to sign alert, check private key?\n");
+    if(!alert.ProcessAlert())
         throw runtime_error(
             "Failed to process alert.\n");
     // Relay alert
@@ -2301,6 +2512,12 @@ static const CRPCCommand vRPCCommands[] =
     { "repairwallet",           &repairwallet,           false},
     { "makekeypair",            &makekeypair,            false},
     { "sendalert",              &sendalert,              false},
+    { "getrawtransaction",      &getrawtransaction,      false},
+    { "listunspent",            &listunspent,            false},
+    { "createrawtransaction",   &createrawtransaction,   false},
+    { "signrawtransaction",     &signrawtransaction,     false},
+    { "sendrawtransaction",     &sendrawtransaction,     false},
+    { "decoderawtransaction",   &decoderawtransaction,   false},
 };
 
 CRPCTable::CRPCTable()
@@ -2849,15 +3066,19 @@ Object CallRPC(const string& strMethod, const Array& params)
 
 
 template
-void ConvertTo(Value& value)
+void ConvertTo(Value& value, bool fAllowNull=false)
 {
+    if (fAllowNull && value.type() == null_type)
+        return;
     if (value.type() == str_type)
     {
         // reinterpret string as unquoted json value
         Value value2;
-        if (!read_string(value.get_str(), value2))
-            throw runtime_error("type mismatch");
-        value = value2.get_value();
+        string strJSON = value.get_str();
+        if (!read_string(strJSON, value2))
+            throw runtime_error(string("Error parsing JSON:")+strJSON);
+        ConvertTo(value2, fAllowNull);
+        value = value2;
     }
     else
     {
@@ -2940,6 +3161,15 @@ int CommandLineRPC(int argc, char *argv[])
                 throw runtime_error("type mismatch "+s);
             params[1] = v.get_array();
         }
+        if (strMethod == "listunspent"            && n > 0) ConvertTo(params[0]);
+        if (strMethod == "listunspent"            && n > 1) ConvertTo(params[1]);
+        if (strMethod == "listunspent"            && n > 2) ConvertTo(params[2]);
+        if (strMethod == "getrawtransaction"      && n > 1) ConvertTo(params[1]);
+        if (strMethod == "createrawtransaction"   && n > 0) ConvertTo(params[0]);
+        if (strMethod == "createrawtransaction"   && n > 1) ConvertTo(params[1]);
+        if (strMethod == "signrawtransaction"     && n > 1) ConvertTo(params[1], true);
+        if (strMethod == "signrawtransaction"     && n > 2) ConvertTo(params[2], true);
+
 
         // Execute
         Object reply = CallRPC(strMethod, params);
diff --git a/src/main.cpp b/src/main.cpp
index a419f7f..6f0603d 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -133,6 +133,33 @@ void static SyncWithWallets(const CTransaction& tx, const CBlock* pblock = NULL,
         pwallet->AddToWalletIfInvolvingMe(tx, pblock, fUpdate);
 }
 
+// Return transaction in tx, and if it was found inside a block, its hash is placed in hashBlock
+bool GetTransaction(const uint256 &hash, CTransaction &tx, uint256 &hashBlock)
+{
+    {
+        LOCK(cs_main);
+        {
+            LOCK(mempool.cs);
+            if (mempool.exists(hash))
+            {
+                tx = mempool.lookup(hash);
+                return true;
+            }
+        }
+        CTxDB txdb("r");
+        CTxIndex txindex;
+        if (tx.ReadFromDisk(txdb, COutPoint(hash, 0), txindex))
+        {
+            CBlock block;
+            if (block.ReadFromDisk(txindex.pos.nFile, txindex.pos.nBlockPos, false))
+                hashBlock = block.GetHash();
+            return true;
+        }
+    }
+    return false;
+}
+
+
 // notify wallets about a new best chain
 void static SetBestChain(const CBlockLocator& loc)
 {
@@ -1683,7 +1710,7 @@ bool CBlock::SetBestChain(CTxDB& txdb, CBlockIndex* pindexNew)
 //          more difficult
 //   txPrev.block.nTime: prevent nodes from guessing a good timestamp to
 //                       generate transaction for future advantage
-//   txPrev.offset: offset of txPrev inside block, to reduce the chance of
+//   txPrev.offset: offset of txPrev inside block, to reduce the chance of
 //                  nodes generating coinstake at the same time
 //   txPrev.nTime: reduce the chance of nodes generating coinstake at the same
 //                 time
@@ -1697,7 +1724,7 @@ bool CTransaction::CheckProofOfStake(unsigned int nBits) const
 {
     CBigNum bnTargetPerCoinDay;
     bnTargetPerCoinDay.SetCompact(nBits);
-
+
     if (!IsCoinStake())
         return true;
 
@@ -1739,7 +1766,7 @@ bool CTransaction::CheckProofOfStake(unsigned int nBits) const
 // ppcoin: total coin age spent in transaction, in the unit of coin-days.
 // Only those coins meeting minimum age requirement counts. As those
 // transactions not in main chain are not currently indexed so we
-// might not find out about their coin age. Older transactions are
+// might not find out about their coin age. Older transactions are
 // guaranteed to be in main chain by sync-checkpoint. This rule is
 // introduced to help nodes establish a consistent view of the coin
 // age (trust score) of competing branches.
@@ -1817,7 +1844,7 @@ bool CBlock::AddToBlockIndex(unsigned int nFile, unsigned int nBlockPos)
     if (!pindexNew)
         return error("AddToBlockIndex() : new CBlockIndex failed");
     map::iterator mi = mapBlockIndex.insert(make_pair(hash, pindexNew)).first;
-    if (pindexNew->fProofOfStake)
+    if (pindexNew->fProofOfStake)
         setStakeSeen.insert(make_pair(pindexNew->prevoutStake, pindexNew->nStakeTime));
 
     pindexNew->phashBlock = &((*mi).first);
@@ -1910,7 +1937,7 @@ bool CBlock::CheckBlock() const
 
     // Check coinbase reward
     if (vtx[0].GetValueOut() > (IsProofOfWork()? (GetProofOfWorkReward(nBits) - vtx[0].GetMinFee() + MIN_TX_FEE) : 0))
-        return DoS(50, error("CheckBlock() : coinbase reward exceeded %s > %s",
+        return DoS(50, error("CheckBlock() : coinbase reward exceeded %s > %s",
                    FormatMoney(vtx[0].GetValueOut()).c_str(),
                    FormatMoney(IsProofOfWork()? GetProofOfWorkReward(nBits) : 0).c_str()));
 
@@ -2433,7 +2460,7 @@ void PrintBlockTree()
 map mapAlerts;
 CCriticalSection cs_mapAlerts;
 
-static string strMintMessage = _("Info: Minting suspended due to locked wallet.");
+static string strMintMessage = _("Info: Minting suspended due to locked wallet.");
 static string strMintWarning;
 
 string GetWarnings(string strFor)
@@ -2882,7 +2909,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
                         // and we want it right after the last block so they don't
                         // wait for other stuff first.
                         // ppcoin: send latest proof-of-work block to allow the
-                        // download node to accept as orphan (proof-of-stake
+                        // download node to accept as orphan (proof-of-stake
                         // block might be rejected by stake connection check)
                         vector vInv;
                         vInv.push_back(CInv(MSG_BLOCK, GetLastBlockIndex(pindexBest, false)->GetBlockHash()));
@@ -3959,7 +3986,7 @@ void BitcoinMiner(CWallet *pwallet, bool fProofOfStake)
                     continue;
                 }
                 strMintWarning = "";
-                printf("CPUMiner : proof-of-stake block found %s\n", pblock->GetHash().ToString().c_str());
+                printf("CPUMiner : proof-of-stake block found %s\n", pblock->GetHash().ToString().c_str());
                 SetThreadPriority(THREAD_PRIORITY_NORMAL);
                 CheckWork(pblock.get(), *pwalletMain, reservekey);
                 SetThreadPriority(THREAD_PRIORITY_LOWEST);
diff --git a/src/main.h b/src/main.h
index 60e4832..c5ab56d 100644
--- a/src/main.h
+++ b/src/main.h
@@ -119,8 +119,7 @@ std::string GetWarnings(std::string strFor);
 uint256 WantedByOrphan(const CBlock* pblockOrphan);
 const CBlockIndex* GetLastBlockIndex(const CBlockIndex* pindex, bool fProofOfStake);
 void BitcoinMiner(CWallet *pwallet, bool fProofOfStake);
-
-
+bool GetTransaction(const uint256 &hash, CTransaction &tx, uint256 &hashBlock);
 
 
 
@@ -856,7 +855,7 @@ public:
         return !(a == b);
     }
     int GetDepthInMainChain() const;
-
+
 };
 
sr. member
Activity: 364
Merit: 252
October 12, 2012, 01:37:11 PM
#13
Code Monkey:
Quote
unfortunately the current version of ppcoind does not support the rpc command getrawtranasction

As has been explained to me, with that feature missing we cannot support ppcoin at this time with our engine, but we now have games and ppcoins ready for when it is supported.
legendary
Activity: 882
Merit: 1001
October 12, 2012, 01:16:00 AM
#12
I hope no one votes for namecoin. I actually LIKE namecoin, but I don't think it should be used like any old currency. I believe that people using it as currency is part of the reason it is failing as a datastore system.
hero member
Activity: 826
Merit: 500
Crypto Somnium
October 12, 2012, 01:00:55 AM
#11
This Weekend if not sooner you shall have PPC gambling !

Sweet  Grin
Pages:
Jump to:
© 2020, Bitcointalksearch.org