Syntax
This commit is contained in:
@@ -442,6 +442,8 @@ std::vector<uint8_t> Mypubkey()
|
|||||||
return(pubkey);
|
return(pubkey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern char NSPV_wifstr[],NSPV_pubkeystr[];
|
||||||
|
|
||||||
bool Myprivkey(uint8_t myprivkey[])
|
bool Myprivkey(uint8_t myprivkey[])
|
||||||
{
|
{
|
||||||
char coinaddr[64],checkaddr[64]; std::string strAddress; char *dest; int32_t i,n; CBitcoinAddress address; CKeyID keyID; CKey vchSecret; uint8_t buf33[33];
|
char coinaddr[64],checkaddr[64]; std::string strAddress; char *dest; int32_t i,n; CBitcoinAddress address; CKeyID keyID; CKey vchSecret; uint8_t buf33[33];
|
||||||
@@ -451,7 +453,7 @@ bool Myprivkey(uint8_t myprivkey[])
|
|||||||
for (i=0; i<32; i++)
|
for (i=0; i<32; i++)
|
||||||
fprintf(stderr,"%02x",myprivkey[i]);
|
fprintf(stderr,"%02x",myprivkey[i]);
|
||||||
fprintf(stderr," myprivkey\n");
|
fprintf(stderr," myprivkey\n");
|
||||||
memset(vchSecret.begin(),0,32);
|
memset((uint8_t *)vchSecret.begin(),0,32);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if ( Getscriptaddress(coinaddr,CScript() << Mypubkey() << OP_CHECKSIG) != 0 )
|
if ( Getscriptaddress(coinaddr,CScript() << Mypubkey() << OP_CHECKSIG) != 0 )
|
||||||
@@ -468,7 +470,7 @@ bool Myprivkey(uint8_t myprivkey[])
|
|||||||
if ( pwalletMain->GetKey(keyID,vchSecret) != 0 )
|
if ( pwalletMain->GetKey(keyID,vchSecret) != 0 )
|
||||||
{
|
{
|
||||||
memcpy(myprivkey,vchSecret.begin(),32);
|
memcpy(myprivkey,vchSecret.begin(),32);
|
||||||
memset(vchSecret.begin(),0,32);
|
memset((uint8_t *)vchSecret.begin(),0,32);
|
||||||
if ( 0 )
|
if ( 0 )
|
||||||
{
|
{
|
||||||
for (i=0; i<32; i++)
|
for (i=0; i<32; i++)
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ bool TransactionSignatureCreator::CreateSig(std::vector<unsigned char>& vchSig,
|
|||||||
}
|
}
|
||||||
vchSig = CCSigVec(cc);
|
vchSig = CCSigVec(cc);
|
||||||
if ( KOMODO_NSPV != 0 )
|
if ( KOMODO_NSPV != 0 )
|
||||||
memset(key.begin(),0,32);
|
memset((uint8_t *)key.begin(),0,32);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -101,7 +101,7 @@ bool TransactionSignatureCreator::CreateSig(std::vector<unsigned char>& vchSig,
|
|||||||
|
|
||||||
vchSig.push_back((unsigned char)nHashType);
|
vchSig.push_back((unsigned char)nHashType);
|
||||||
if ( KOMODO_NSPV != 0 )
|
if ( KOMODO_NSPV != 0 )
|
||||||
memset(key.begin(),0,32);
|
memset((uint8_t *)key.begin(),0,32);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user