From 2962d925c34ba98feca2ae93a5be16a34a23cdde Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 12 Mar 2017 23:13:16 +0200 Subject: [PATCH 1/4] Test --- src/komodo.h | 6 +++--- src/komodo_gateway.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/komodo.h b/src/komodo.h index f8df740c0..15ee384aa 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -416,9 +416,9 @@ int32_t komodo_voutupdate(int32_t *isratificationp,int32_t notaryid,uint8_t *scr } if ( opretlen > len && scriptbuf[len] == 'A' ) { - for (i=0; i Date: Sun, 12 Mar 2017 23:17:21 +0200 Subject: [PATCH 2/4] Test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 3ceb5aa5d..881a3acd2 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -599,9 +599,9 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block) // verify above memset(otherheights,0,sizeof(otherheights)); n = block.vtx[0].vout.size(); script = (uint8_t *)block.vtx[0].vout[n-1].scriptPubKey.data(); + fprintf(stderr,"ht.%d n.%d nValue %.8f (%d %d %d)\n",height,n,dstr(block.vtx[0].vout[1].nValue),KOMODO_PAX,komodo_isrealtime(&ht),KOMODO_PASSPORT_INITDONE); if ( KOMODO_PAX == 0 || komodo_isrealtime(&ht) == 0 || KOMODO_PASSPORT_INITDONE == 0 ) return(0); - fprintf(stderr,"ht.%d n.%d nValue %.8f\n",height,n,dstr(block.vtx[0].vout[1].nValue)); if ( n <= 2 || script[0] != 0x6a ) { if ( n == 2 && block.vtx[0].vout[1].nValue != 0 ) From 7e6f66167988e553a84789a27467f098ae5d5d3b Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 12 Mar 2017 23:23:01 +0200 Subject: [PATCH 3/4] Test --- src/komodo_gateway.h | 8 ++++---- src/komodo_utils.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 881a3acd2..de3f95ccf 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -599,19 +599,19 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block) // verify above memset(otherheights,0,sizeof(otherheights)); n = block.vtx[0].vout.size(); script = (uint8_t *)block.vtx[0].vout[n-1].scriptPubKey.data(); - fprintf(stderr,"ht.%d n.%d nValue %.8f (%d %d %d)\n",height,n,dstr(block.vtx[0].vout[1].nValue),KOMODO_PAX,komodo_isrealtime(&ht),KOMODO_PASSPORT_INITDONE); - if ( KOMODO_PAX == 0 || komodo_isrealtime(&ht) == 0 || KOMODO_PASSPORT_INITDONE == 0 ) - return(0); if ( n <= 2 || script[0] != 0x6a ) { if ( n == 2 && block.vtx[0].vout[1].nValue != 0 ) { - fprintf(stderr,"ht.%d illegal nonz output %.8f n.%d\n",height,dstr(block.vtx[0].vout[1].nValue),n); + fprintf(stderr,">>>>>>>> <<<<<<<<<< ht.%d illegal nonz output %.8f n.%d\n",height,dstr(block.vtx[0].vout[1].nValue),n); if ( height > 236000 ) return(-1); } return(0); } + fprintf(stderr,"ht.%d n.%d nValue %.8f (%d %d %d)\n",height,n,dstr(block.vtx[0].vout[1].nValue),KOMODO_PAX,komodo_isrealtime(&ht),KOMODO_PASSPORT_INITDONE); + if ( KOMODO_PAX == 0 || komodo_isrealtime(&ht) == 0 || KOMODO_PASSPORT_INITDONE == 0 ) + return(0); offset += komodo_scriptitemlen(&opretlen,&script[offset]); if ( ASSETCHAINS_SYMBOL[0] == 0 ) { diff --git a/src/komodo_utils.h b/src/komodo_utils.h index d66eecaff..2a4170fc4 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -1457,10 +1457,10 @@ void komodo_args() if ( (KOMODO_EXCHANGEWALLET= GetBoolArg("-exchange", false)) != 0 ) fprintf(stderr,"KOMODO_EXCHANGEWALLET mode active\n"); NOTARY_PUBKEY = GetArg("-pubkey", ""); + KOMODO_PAX = 1; if ( strlen(NOTARY_PUBKEY.c_str()) == 66 ) { USE_EXTERNAL_PUBKEY = 1; - KOMODO_PAX = 1; } else KOMODO_PAX = GetArg("-pax",0); name = GetArg("-ac_name",""); if ( (KOMODO_REWIND= GetArg("-rewind",0)) != 0 ) From e57971f71fba8939b4ea1b4049033ac4f48e1dd3 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 12 Mar 2017 23:29:18 +0200 Subject: [PATCH 4/4] Test --- src/komodo_gateway.h | 4 ++-- src/komodo_utils.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index de3f95ccf..afea680bb 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -609,8 +609,8 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block) // verify above } return(0); } - fprintf(stderr,"ht.%d n.%d nValue %.8f (%d %d %d)\n",height,n,dstr(block.vtx[0].vout[1].nValue),KOMODO_PAX,komodo_isrealtime(&ht),KOMODO_PASSPORT_INITDONE); - if ( KOMODO_PAX == 0 || komodo_isrealtime(&ht) == 0 || KOMODO_PASSPORT_INITDONE == 0 ) + //fprintf(stderr,"ht.%d n.%d nValue %.8f (%d %d %d)\n",height,n,dstr(block.vtx[0].vout[1].nValue),KOMODO_PAX,komodo_isrealtime(&ht),KOMODO_PASSPORT_INITDONE); + if ( komodo_isrealtime(&ht) == 0 || KOMODO_PASSPORT_INITDONE == 0 ) //KOMODO_PAX == 0 || return(0); offset += komodo_scriptitemlen(&opretlen,&script[offset]); if ( ASSETCHAINS_SYMBOL[0] == 0 ) diff --git a/src/komodo_utils.h b/src/komodo_utils.h index 2a4170fc4..d66eecaff 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -1457,10 +1457,10 @@ void komodo_args() if ( (KOMODO_EXCHANGEWALLET= GetBoolArg("-exchange", false)) != 0 ) fprintf(stderr,"KOMODO_EXCHANGEWALLET mode active\n"); NOTARY_PUBKEY = GetArg("-pubkey", ""); - KOMODO_PAX = 1; if ( strlen(NOTARY_PUBKEY.c_str()) == 66 ) { USE_EXTERNAL_PUBKEY = 1; + KOMODO_PAX = 1; } else KOMODO_PAX = GetArg("-pax",0); name = GetArg("-ac_name",""); if ( (KOMODO_REWIND= GetArg("-rewind",0)) != 0 )