From 5d8427a94b0a52bebfcc89f3de3a736abbe9837d Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 7 Feb 2017 10:27:06 +0200 Subject: [PATCH] test --- iguana/dPoW.h | 2 +- iguana/dpow/dpow_network.c | 4 ++-- iguana/tests/dexlistunspent | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/iguana/dPoW.h b/iguana/dPoW.h index 234f895d1..fbb9f006d 100755 --- a/iguana/dPoW.h +++ b/iguana/dPoW.h @@ -137,7 +137,7 @@ struct dpow_info int32_t lastheight,maxblocks,SRCHEIGHT,SHORTFLAG,ratifying; struct pax_transaction *PAX; portable_mutex_t paxmutex,dexmutex; - uint32_t ipbits[100],numipbits; + uint32_t ipbits[64],numipbits; struct dpow_block **blocks; }; uint64_t dpow_notarybestk(uint64_t refmask,struct dpow_block *bp,int8_t *lastkp); diff --git a/iguana/dpow/dpow_network.c b/iguana/dpow/dpow_network.c index 609885972..60f0ef234 100755 --- a/iguana/dpow/dpow_network.c +++ b/iguana/dpow/dpow_network.c @@ -1015,7 +1015,7 @@ struct dpow_nanomsghdr { bits256 srchash,desthash; struct dpow_nanoutxo ratify,notarize; - uint32_t channel,height,size,datalen,crc32,myipbits,numipbits,ipbits[100]; + uint32_t channel,height,size,datalen,crc32,myipbits,numipbits,ipbits[64]; char symbol[16]; uint8_t senderind,version0,version1,packet[]; } PACKED; @@ -1725,7 +1725,7 @@ void dpow_send(struct supernet_info *myinfo,struct dpow_info *dp,struct dpow_blo void dpow_ipbitsadd(struct supernet_info *myinfo,struct dpow_info *dp,uint32_t *ipbits,int32_t numipbits,int32_t fromid,uint32_t senderipbits) { int32_t i,j,matched,missing,n; char ipaddr[64]; - if ( numipbits > sizeof(dp->ipbits)/sizeof(*dp->ipbits) ) + if ( numipbits >= 64 ) { static int32_t counter; if ( counter++ < 100 ) diff --git a/iguana/tests/dexlistunspent b/iguana/tests/dexlistunspent index 2ddf10690..7d7838709 100755 --- a/iguana/tests/dexlistunspent +++ b/iguana/tests/dexlistunspent @@ -1,2 +1,2 @@ #!/bin/bash -curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RSTKuMryZW56yf3kdEXhMJG8Hy9TwvHwYs\",\"symbol\":\"KMD\"}" +curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RKyuFwhojJgYNUQjuHWEcDUouiPHCpbRS6\",\"symbol\":\"KMD\"}"