This commit is contained in:
jl777
2017-03-19 17:37:41 +02:00
parent 15a8c93002
commit 22e2f9b139

View File

@@ -635,7 +635,7 @@ void komodo_bannedset(uint256 *array,int32_t max)
int32_t komodo_check_deposit(int32_t height,const CBlock& block) // verify above block is valid pax pricing
{
static uint256 array[15];
int32_t i,j,k,n,ht,txn_count,num,opretlen,offset=1,errs=0,matched=0,kmdheights[64],otherheights[64]; uint256 hash,txids[64]; char symbol[16],base[16]; uint16_t vouts[64]; int8_t baseids[64]; uint8_t *script,opcode,rmd160s[64*20]; uint64_t total,available,deposited,issued,withdrawn,approved,redeemed; int64_t values[64],srcvalues[64]; struct pax_transaction *pax; struct komodo_state *sp;
int32_t i,j,k,n,ht,baseid,txn_count,num,opretlen,offset=1,errs=0,matched=0,kmdheights[64],otherheights[64]; uint256 hash,txids[64]; char symbol[16],base[16]; uint16_t vouts[64]; int8_t baseids[64]; uint8_t *script,opcode,rmd160s[64*20]; uint64_t total,available,deposited,issued,withdrawn,approved,redeemed; int64_t values[64],srcvalues[64]; struct pax_transaction *pax; struct komodo_state *sp;
if ( *(int32_t *)&array[0] == 0 )
komodo_bannedset(array,(int32_t)(sizeof(array)/sizeof(*array)));
memset(baseids,0xff,sizeof(baseids));
@@ -716,7 +716,7 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block) // verify above
{
strcpy(symbol,ASSETCHAINS_SYMBOL);
opcode = 'I';
if ( komodo_baseid(symbol) < 0 )
if ( (baseid= komodo_baseid(symbol)) < 0 )
{
if ( block.vtx[0].vout.size() != 1 )
{
@@ -732,6 +732,8 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block) // verify above
}
if ( KOMODO_PASSPORT_INITDONE == 0 ) // komodo_isrealtime(&ht) == 0 || init time already in DB
return(0);
if ( baseid == USD && (height <= 4000 || komodo_isrealtime(&ht) == 0) )
return(0);
}
if ( script[offset] == opcode && opretlen < block.vtx[0].vout[n-1].scriptPubKey.size() )
{