From ee659c3408a37bebac8fcfdedf972dd2b74130ec Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 21 Aug 2016 23:28:39 -0300 Subject: [PATCH] test --- iguana/iguana_chains.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/iguana/iguana_chains.c b/iguana/iguana_chains.c index bdb5c1888..2af8bd2ca 100755 --- a/iguana/iguana_chains.c +++ b/iguana/iguana_chains.c @@ -367,14 +367,17 @@ void iguana_chainparms(struct iguana_chain *chain,cJSON *argjson) else chain->initialreward = 50 * SATOSHIDEN; if ( chain->serverport[0] == 0 ) sprintf(chain->serverport,"127.0.0.1:%u",chain->rpcport); - if ( (hexstr= jstr(argjson,"pubval")) != 0 && strlen(hexstr) == 2 ) + chain->pubtype = juint(argjson,"pubval"); + chain->p2shtype = juint(argjson,"p2shval"); + chain->wiftype = juint(argjson,"wifval"); + /*if ( (hexstr= jstr(argjson,"pubval")) != 0 && strlen(hexstr) == 2 ) decode_hex((uint8_t *)&chain->pubtype,1,hexstr); if ( (hexstr= jstr(argjson,"scriptval")) != 0 && strlen(hexstr) == 2 ) decode_hex((uint8_t *)&chain->p2shtype,1,hexstr); else if ( (hexstr= jstr(argjson,"p2shval")) != 0 && strlen(hexstr) == 2 ) decode_hex((uint8_t *)&chain->p2shtype,1,hexstr); if ( (hexstr= jstr(argjson,"wifval")) != 0 && strlen(hexstr) == 2 ) - decode_hex((uint8_t *)&chain->wiftype,1,hexstr); + decode_hex((uint8_t *)&chain->wiftype,1,hexstr);*/ printf("addrtypes.(%02x %02x %02x) (%d %d %d)\n",chain->pubtype,chain->p2shtype,chain->wiftype,chain->pubtype,chain->p2shtype,chain->wiftype); if ( (hexstr= jstr(argjson,"netmagic")) != 0 && strlen(hexstr) == 8 ) decode_hex((uint8_t *)chain->netmagic,4,hexstr);