Decentralized Devtax
This commit is contained in:
@@ -30,6 +30,7 @@ int32_t hush_voutupdate(bool fJustCheck,int32_t *isratificationp,int32_t notaryi
|
||||
bool EnsureWalletIsAvailable(bool avoidException);
|
||||
extern bool fRequestShutdown;
|
||||
extern CScript HUSH_EARLYTXID_SCRIPTPUB;
|
||||
extern std::string scriptpub_for_height(uint32_t nHeight);
|
||||
|
||||
uint32_t hush_heightstamp(int32_t height);
|
||||
|
||||
@@ -1548,6 +1549,8 @@ bool hush_appendACscriptpub()
|
||||
static bool didinit = false;
|
||||
if ( didinit )
|
||||
return didinit;
|
||||
// HUSH doesn't use earlytxid so we do not need this in this function
|
||||
//ASSETCHAINS_SCRIPTPUB = scriptpub_for_height(height);
|
||||
if ( ASSETCHAINS_SCRIPTPUB[ASSETCHAINS_SCRIPTPUB.back()] == 49 && ASSETCHAINS_SCRIPTPUB[ASSETCHAINS_SCRIPTPUB.back()-1] == 51 )
|
||||
{
|
||||
CTransaction tx; uint256 blockhash;
|
||||
@@ -1616,6 +1619,7 @@ int64_t hush_checkcommission(CBlock *pblock,int32_t height)
|
||||
if(fDebug)
|
||||
fprintf(stderr,"%s at height=%d\n",__func__,height);
|
||||
int64_t checktoshis=0; uint8_t *script,scripthex[8192]; int32_t scriptlen,matched = 0; static bool didinit = false;
|
||||
ASSETCHAINS_SCRIPTPUB = scriptpub_for_height(height);
|
||||
if ( ASSETCHAINS_COMMISSION != 0 || ASSETCHAINS_FOUNDERS_REWARD != 0 )
|
||||
{
|
||||
checktoshis = the_commission(pblock,height);
|
||||
@@ -1728,6 +1732,7 @@ int32_t hush_checkPOW(int32_t slowflag,CBlock *pblock,int32_t height)
|
||||
}
|
||||
if ( failed == 0 && ASSETCHAINS_COMMISSION != 0 ) {
|
||||
if ( height == 1 ) {
|
||||
ASSETCHAINS_SCRIPTPUB = scriptpub_for_height(height);
|
||||
if ( ASSETCHAINS_SCRIPTPUB.size() > 1 && ASSETCHAINS_SCRIPTPUB[ASSETCHAINS_SCRIPTPUB.back()] != 49 && ASSETCHAINS_SCRIPTPUB[ASSETCHAINS_SCRIPTPUB.back()-1] != 51 ) {
|
||||
int32_t scriptlen; uint8_t scripthex[10000];
|
||||
script = (uint8_t *)&pblock->vtx[0].vout[0].scriptPubKey[0];
|
||||
|
||||
Reference in New Issue
Block a user