From f0c9d6c2863c3fe5cca03b3a3359ae838a2922c0 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 17 Jan 2017 22:01:29 +0200 Subject: [PATCH] test --- iguana/dpow/dpow_network.c | 6 +++--- iguana/tests/dexcheckaddress | 7 ++++--- iguana/tests/dexlistunspent | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/iguana/dpow/dpow_network.c b/iguana/dpow/dpow_network.c index 49044d443..39e59f6de 100755 --- a/iguana/dpow/dpow_network.c +++ b/iguana/dpow/dpow_network.c @@ -177,7 +177,7 @@ int32_t signed_nn_recv(void **freeptrp,void *ctx,uint8_t notaries[64][33],int32_ if ( memcmp(pubkey33,notaries[i],33) == 0 ) { *(void **)packetp = (void **)((uint64_t)sigpacket + sizeof(*sigpacket)); - //printf("got signed packet from notary.%d\n",i); + printf("got signed packet from notary.%d\n",i); *freeptrp = sigpacket; return((int32_t)(recvbytes - sizeof(*sigpacket))); } @@ -194,7 +194,7 @@ int32_t signed_nn_recv(void **freeptrp,void *ctx,uint8_t notaries[64][33],int32_ printf(" invalid pubkey33 n.%d\n",n); } else printf("recoververify error nonce.%u packetlen.%d\n",sigpacket->nonce,sigpacket->packetlen); } else printf("hash mismatch or bad nonce.%u packetlen.%d\n",sigpacket->nonce,sigpacket->packetlen); - } //else printf("recvbytes.%d mismatched packetlen.%d + %ld\n",recvbytes,sigpacket!=0?sigpacket->packetlen:-1,sizeof(*sigpacket)); + } else printf("recvbytes.%d mismatched packetlen.%d + %ld\n",recvbytes,sigpacket!=0?sigpacket->packetlen:-1,sizeof(*sigpacket)); //printf("free sigpacket.%p freeptrp.%p packetp.%p\n",sigpacket,*freeptrp,*(void **)packetp); if ( sigpacket != 0 ) nn_freemsg(sigpacket), sigpacket = 0; @@ -1772,7 +1772,7 @@ int32_t dpow_nanomsg_update(struct supernet_info *myinfo) num++; if ( dex_packetcheck(myinfo,dexp,size) == 0 ) { - //printf("FROM BUS.%08x -> pub\n",dexp->crc32); + printf("FROM BUS.%08x -> pub\n",dexp->crc32); signed_nn_send(myinfo->ctx,myinfo->persistent_priv,myinfo->pubsock,dexp,size); dex_packet(myinfo,dexp,size); } diff --git a/iguana/tests/dexcheckaddress b/iguana/tests/dexcheckaddress index e68efa82d..2ffb57a10 100755 --- a/iguana/tests/dexcheckaddress +++ b/iguana/tests/dexcheckaddress @@ -1,4 +1,5 @@ #!/bin/bash -curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"checkaddress\",\"address\":\"1Hgzt5xsnbfc8UTWqWKSTLRm5bEYHYBoCE\",\"symbol\":\"BTC\"}" -curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"checkaddress\",\"address\":\"RRyBxbrAPRUBCUpiJgJZYrkxqrh8x5ta9Z\",\"symbol\":\"USD\"}" -curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"checkaddress\",\"address\":\"RRyBxbrAPRUBCUpiJgJZYrkxqrh8x5ta9Z\",\"symbol\":\"MVP\"}" +curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"checkaddress\",\"address\":\"RYHpUJFaB4QHUW8jCJCCNL2kzWq3D3QoyG\",\"symbol\":\"KMD\"}" +#curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"checkaddress\",\"address\":\"1Hgzt5xsnbfc8UTWqWKSTLRm5bEYHYBoCE\",\"symbol\":\"BTC\"}" +#curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"checkaddress\",\"address\":\"RRyBxbrAPRUBCUpiJgJZYrkxqrh8x5ta9Z\",\"symbol\":\"USD\"}" +#curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"checkaddress\",\"address\":\"RRyBxbrAPRUBCUpiJgJZYrkxqrh8x5ta9Z\",\"symbol\":\"MVP\"}" diff --git a/iguana/tests/dexlistunspent b/iguana/tests/dexlistunspent index 7347339da..5ed13afe5 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\":\"RRyBxbrAPRUBCUpiJgJZYrkxqrh8x5ta9Z\",\"symbol\":\"KMD\"}" +curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RYHpUJFaB4QHUW8jCJCCNL2kzWq3D3QoyG\",\"symbol\":\"KMD\"}"