From c466bfd18a398d8d22b0146c9bcf02a2ab5663de Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 8 Jul 2019 20:38:18 -1100 Subject: [PATCH] New notaries count --- src/komodo_nSPV.h | 23 ++++++++++++++++++++++- src/komodo_nSPV_superlite.h | 2 +- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/komodo_nSPV.h b/src/komodo_nSPV.h index 72a23d23f..614e7f86f 100644 --- a/src/komodo_nSPV.h +++ b/src/komodo_nSPV.h @@ -431,6 +431,27 @@ int32_t NSPV_txextract(CTransaction &tx,uint8_t *data,int32_t datalen) However, since the vouts being spent by the notaries are highly constrained p2pk vouts, the txhash can be deduced if a specific notary pubkey is indeed the signer */ +bool NSPV_SignTx(CMutableTransaction &mtx,int32_t vini,int64_t utxovalue,const CScript scriptPubKey); + +int32_t NSPV_newnotariescount(CTransaction tx,uint8_t elected[64][33]) +{ + CPubKey pubkeys[64]; CScript scriptPubKeys[64]; CMutableTransaction mtx(tx); int32_t vini,j,numsigs = 0; + for (j=0; j<64; j++) + { + pubkeys[j] = buf2pk(elected[j]); + scriptPubKeys[j] = CScript() << ParseHex(HexStr(pubkeys[j])) << OP_CHECKSIG); + } + for (vini=0; vini= NSPV_inforesult.height && strcmp(coinaddr,NSPV_utxosresult.coinaddr) == 0 ) + if ( NSPV_utxosresult.nodeheight >= NSPV_inforesult.height && strcmp(coinaddr,NSPV_utxosresult.coinaddr) == 0 && CCflag == NSPV_utxosresult.CCflag ) return(NSPV_utxosresp_json(&NSPV_utxosresult)); } } else sleep(1);