Add fix to remove KMD coinbase check with pool fee workaround at block 227520 (~Oct 28th)
This commit is contained in:
@@ -14,11 +14,12 @@ bit output.
|
||||
|
||||
void (*CVerusHash::haraka512Function)(unsigned char *out, const unsigned char *in);
|
||||
|
||||
void CVerusHash::Hash(void *result, const void *data, size_t len)
|
||||
void CVerusHash::Hash(void *result, const void *data, size_t _len)
|
||||
{
|
||||
unsigned char buf[128];
|
||||
unsigned char *bufPtr = buf;
|
||||
int pos = 0, nextOffset = 64;
|
||||
int nextOffset = 64;
|
||||
uint32_t pos = 0, len = _len;
|
||||
unsigned char *bufPtr2 = bufPtr + nextOffset;
|
||||
unsigned char *ptr = (unsigned char *)data;
|
||||
|
||||
@@ -58,14 +59,15 @@ void CVerusHash::init()
|
||||
}
|
||||
}
|
||||
|
||||
CVerusHash &CVerusHash::Write(const unsigned char *data, size_t len)
|
||||
CVerusHash &CVerusHash::Write(const unsigned char *data, size_t _len)
|
||||
{
|
||||
unsigned char *tmp;
|
||||
uint32_t pos, len = _len;
|
||||
|
||||
// digest up to 32 bytes at a time
|
||||
for ( int pos = 0; pos < len; )
|
||||
for ( pos = 0; pos < len; )
|
||||
{
|
||||
int room = 32 - curPos;
|
||||
uint32_t room = 32 - curPos;
|
||||
|
||||
if (len - pos >= room)
|
||||
{
|
||||
|
||||
@@ -9,5 +9,7 @@
|
||||
#define KOMODO_LIMITED_NETWORKSIZE 4
|
||||
#define KOMODO_MAXMEMPOOLTIME 3600 // affects consensus
|
||||
#define CRYPTO777_PUBSECPSTR "020e46e79a2a8d12b9b5d12c7a91adb4e454edfae43c0a0cb805427d2ac7613fd9"
|
||||
#define VRSC_KMD_MERGE_FIX 227520 // height that the inadvertent KMD merge/coinbase output changes to VRSC are removed
|
||||
// approximately October 28th
|
||||
|
||||
#endif
|
||||
|
||||
@@ -687,10 +687,12 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block,uint32_t prevtim
|
||||
}
|
||||
}
|
||||
}
|
||||
n = block.vtx[0].vout.size();
|
||||
//script = (uint8_t *)block.vtx[0].vout[n-1].scriptPubKey.data();
|
||||
//if ( n <= 2 || script[0] != 0x6a )
|
||||
// we don't want any of these checks in VRSC, leave it for other chains until/unless KMD removes
|
||||
if ( ASSETCHAINS_SYMBOL[0] == 0 ||
|
||||
(ASSETCHAINS_COMMISSION != 0 && height > 1) ||
|
||||
(strcmp(ASSETCHAINS_SYMBOL,"VRSC") == 0 && height < VRSC_KMD_MERGE_FIX) )
|
||||
{
|
||||
n = block.vtx[0].vout.size();
|
||||
int64_t val,prevtotal = 0; int32_t strangeout=0,overflow = 0;
|
||||
total = 0;
|
||||
for (i=1; i<n; i++)
|
||||
@@ -764,8 +766,8 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block,uint32_t prevtim
|
||||
return(-1);
|
||||
}
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int32_t opretlen,uint256 txid,uint16_t vout,char *source)
|
||||
|
||||
Reference in New Issue
Block a user