From 22e2f9b139fed7c79811857f9a81da3b94ff9201 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 19 Mar 2017 17:37:41 +0200 Subject: [PATCH] Test --- src/komodo_gateway.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 541269819..f92c7f891 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -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() ) {