Hush DPoW won't attack their own villages, lulz
This commit is contained in:
@@ -54,7 +54,7 @@ extern int32_t HUSH_INSYNC;
|
||||
extern bool fZindex;
|
||||
extern void TxToJSON(const CTransaction& tx, const uint256 hashBlock, UniValue& entry);
|
||||
void ScriptPubKeyToJSON(const CScript& scriptPubKey, UniValue& out, bool fIncludeHex);
|
||||
int32_t komodo_notarized_height(int32_t *prevMoMheightp,uint256 *hashp,uint256 *txidp);
|
||||
int32_t hush_notarized_height(int32_t *prevMoMheightp,uint256 *hashp,uint256 *txidp);
|
||||
#include "hush_defs.h"
|
||||
#include "hush_structs.h"
|
||||
|
||||
@@ -138,7 +138,7 @@ UniValue blockheaderToJSON(const CBlockIndex* blockindex)
|
||||
return(result);
|
||||
}
|
||||
uint256 notarized_hash,notarized_desttxid; int32_t prevMoMheight,notarized_height;
|
||||
notarized_height = komodo_notarized_height(&prevMoMheight,¬arized_hash,¬arized_desttxid);
|
||||
notarized_height = hush_notarized_height(&prevMoMheight,¬arized_hash,¬arized_desttxid);
|
||||
result.push_back(Pair("last_notarized_height", notarized_height));
|
||||
result.push_back(Pair("hash", blockindex->GetBlockHash().GetHex()));
|
||||
int confirmations = -1;
|
||||
@@ -292,7 +292,7 @@ UniValue blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool tx
|
||||
{
|
||||
UniValue result(UniValue::VOBJ);
|
||||
uint256 notarized_hash,notarized_desttxid; int32_t prevMoMheight,notarized_height;
|
||||
notarized_height = komodo_notarized_height(&prevMoMheight,¬arized_hash,¬arized_desttxid);
|
||||
notarized_height = hush_notarized_height(&prevMoMheight,¬arized_hash,¬arized_desttxid);
|
||||
result.push_back(Pair("last_notarized_height", notarized_height));
|
||||
result.push_back(Pair("hash", block.GetHash().GetHex()));
|
||||
int confirmations = -1;
|
||||
@@ -1654,7 +1654,7 @@ UniValue getblockchaininfo(const UniValue& params, bool fHelp, const CPubKey& my
|
||||
int32_t longestchain = HUSH_LONGESTCHAIN;//hush_longestchain();
|
||||
progress = (longestchain > 0 ) ? (double) chainActive.Height() / longestchain : 1.0;
|
||||
}
|
||||
notarized_height = komodo_notarized_height(&prevMoMheight,¬arized_hash,¬arized_desttxid);
|
||||
notarized_height = hush_notarized_height(&prevMoMheight,¬arized_hash,¬arized_desttxid);
|
||||
UniValue obj(UniValue::VOBJ);
|
||||
obj.push_back(Pair("chain", Params().NetworkIDString()));
|
||||
obj.push_back(Pair("blocks", (int)chainActive.Height()));
|
||||
|
||||
@@ -56,7 +56,7 @@ using namespace std;
|
||||
|
||||
uint64_t komodo_interestsum();
|
||||
int32_t hush_longestchain();
|
||||
int32_t komodo_notarized_height(int32_t *prevMoMheightp,uint256 *hashp,uint256 *txidp);
|
||||
int32_t hush_notarized_height(int32_t *prevMoMheightp,uint256 *hashp,uint256 *txidp);
|
||||
bool komodo_txnotarizedconfirmed(uint256 txid);
|
||||
uint32_t komodo_chainactive_timestamp();
|
||||
int32_t komodo_whoami(char *pubkeystr,int32_t height,uint32_t timestamp);
|
||||
@@ -219,7 +219,7 @@ UniValue getinfo(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
||||
|
||||
proxyType proxy;
|
||||
GetProxy(NET_IPV4, proxy);
|
||||
notarized_height = komodo_notarized_height(&prevMoMheight,¬arized_hash,¬arized_desttxid);
|
||||
notarized_height = hush_notarized_height(&prevMoMheight,¬arized_hash,¬arized_desttxid);
|
||||
//fprintf(stderr,"after notarized_height %u\n",(uint32_t)time(NULL));
|
||||
|
||||
UniValue obj(UniValue::VOBJ);
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
#include <univalue.h>
|
||||
|
||||
int32_t komodo_notarized_height(int32_t *prevMoMheightp,uint256 *hashp,uint256 *txidp);
|
||||
int32_t hush_notarized_height(int32_t *prevMoMheightp,uint256 *hashp,uint256 *txidp);
|
||||
|
||||
using namespace std;
|
||||
|
||||
@@ -133,7 +133,7 @@ int32_t myIsutxo_spent(uint256 &spenttxid,uint256 txid,int32_t vout)
|
||||
void TxToJSONExpanded(const CTransaction& tx, const uint256 hashBlock, UniValue& entry, int nHeight = 0, int nConfirmations = 0, int nBlockTime = 0)
|
||||
{
|
||||
uint256 notarized_hash,notarized_desttxid; int32_t prevMoMheight,notarized_height;
|
||||
notarized_height = komodo_notarized_height(&prevMoMheight,¬arized_hash,¬arized_desttxid);
|
||||
notarized_height = hush_notarized_height(&prevMoMheight,¬arized_hash,¬arized_desttxid);
|
||||
uint256 txid = tx.GetHash();
|
||||
entry.push_back(Pair("txid", txid.GetHex()));
|
||||
entry.push_back(Pair("overwintered", tx.fOverwintered));
|
||||
|
||||
Reference in New Issue
Block a user