From 5201bb517217d1a6bec4cf9217ec9e8559eeb767 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 9 Oct 2017 18:01:45 +0300 Subject: [PATCH] Test --- src/komodo_bitcoind.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/komodo_bitcoind.h b/src/komodo_bitcoind.h index cc8ebe3d3..8c19d2946 100644 --- a/src/komodo_bitcoind.h +++ b/src/komodo_bitcoind.h @@ -431,7 +431,24 @@ int32_t komodo_verifynotarization(char *symbol,char *dest,int32_t height,int32_t if ( strcmp(dest,"KMD") == 0 ) { if ( KMDUSERPASS[0] != 0 ) - jsonstr = komodo_issuemethod(KMDUSERPASS,(char *)"getrawtransaction",params,7771); + { + if ( ASSETCHAINS_SYMBOL[0] != 0 ) + jsonstr = komodo_issuemethod(KMDUSERPASS,(char *)"getrawtransaction",params,7771); + else + { + CTransaction tx; uint256 hashBlock; int32_t numvouts,len; uint8_t *ptr; + if ( GetTransaction(txid,tx,hashBlock,true) == 0 ) + return(-1); + if ( (numvouts= tx.vout.size()) > 0 ) + { + ptr = (uint8_t *)tx.vout[numvouts - 1].scriptPubKey.data(); + len = tx.vout[numvouts - 1].scriptPubKey.size(); + retval = komodo_verifynotarizedscript(height,ptr,len,NOTARIZED_HASH); + printf("direct verify ht.%d -> %d\n",height,retval); + return(retval); + } + } + } //else jsonstr = _dex_getrawtransaction(); else return(0); // need universal way to issue DEX* API, since notaries mine most blocks, this ok }