This commit is contained in:
@@ -3063,17 +3063,22 @@ char *dilithium_hexstr(char *str,uint8_t *buf,int32_t len)
|
||||
int32_t dilithium_bigpubget(std::string &handle,CPubKey &pk33,uint8_t *pk,uint256 pubtxid)
|
||||
{
|
||||
CTransaction tx; uint8_t funcid; uint256 hashBlock; int32_t numvouts=0; std::vector<uint8_t> bigpub;
|
||||
if ( myGetTransaction(pubtxid,tx,hashBlock) != 0 && (numvouts= tx.vout.size()) > 1 )
|
||||
fprintf(stderr,"inside bigpubget\n");
|
||||
if ( myGetTransaction(pubtxid,tx,hashBlock) != 0 )
|
||||
{
|
||||
if ( (funcid= dilithium_registeropretdecode(handle,pk33,bigpub,tx.vout[numvouts-1].scriptPubKey)) == 'R' && bigpub.size() == CRYPTO_PUBLICKEYBYTES )
|
||||
fprintf(stderr,"got tx\n");
|
||||
if ( (numvouts= tx.vout.size()) > 1 )
|
||||
{
|
||||
memcpy(pk,&bigpub[0],CRYPTO_PUBLICKEYBYTES);
|
||||
return(0);
|
||||
if ( (funcid= dilithium_registeropretdecode(handle,pk33,bigpub,tx.vout[numvouts-1].scriptPubKey)) == 'R' && bigpub.size() == CRYPTO_PUBLICKEYBYTES )
|
||||
{
|
||||
memcpy(pk,&bigpub[0],CRYPTO_PUBLICKEYBYTES);
|
||||
return(0);
|
||||
}
|
||||
fprintf(stderr,"%s funcid.(%c) size.%d vs %d\n",handle.c_str(),funcid,(int32_t)bigpub.size(),CRYPTO_PUBLICKEYBYTES);
|
||||
return(-2);
|
||||
}
|
||||
fprintf(stderr,"%s funcid.(%c) size.%d vs %d\n",handle.c_str(),funcid,(int32_t)bigpub.size(),CRYPTO_PUBLICKEYBYTES);
|
||||
return(-2);
|
||||
}
|
||||
fprintf(stderr,"numvouts.%d\n",numvouts);
|
||||
fprintf(stderr,"numvouts.%d\n",numvouts);
|
||||
} else fprintf(stderr,"no tx\n");
|
||||
return(-1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user