Set nLockTime
This commit is contained in:
@@ -302,6 +302,7 @@ UniValue NSPV_spend(char *srcaddr,char *destaddr,int64_t satoshis) // what its a
|
|||||||
mtx.nExpiryHeight = 0;
|
mtx.nExpiryHeight = 0;
|
||||||
mtx.nVersionGroupId = SAPLING_VERSION_GROUP_ID;
|
mtx.nVersionGroupId = SAPLING_VERSION_GROUP_ID;
|
||||||
mtx.nVersion = SAPLING_TX_VERSION;
|
mtx.nVersion = SAPLING_TX_VERSION;
|
||||||
|
mtx.nLockTime = (uint32_t)time(NULL) - 777;
|
||||||
memset(used,0,sizeof(used));
|
memset(used,0,sizeof(used));
|
||||||
data.resize(20);
|
data.resize(20);
|
||||||
memcpy(&data[0],&rmd160[1],20);
|
memcpy(&data[0],&rmd160[1],20);
|
||||||
|
|||||||
@@ -158,6 +158,8 @@ char *komodo_chainname()
|
|||||||
return(ASSETCHAINS_SYMBOL[0] == 0 ? (char *)"KMD" : ASSETCHAINS_SYMBOL);
|
return(ASSETCHAINS_SYMBOL[0] == 0 ? (char *)"KMD" : ASSETCHAINS_SYMBOL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OS_randombytes(unsigned char *x,long xlen);
|
||||||
|
|
||||||
UniValue getnewaddress(const UniValue& params, bool fHelp)
|
UniValue getnewaddress(const UniValue& params, bool fHelp)
|
||||||
{
|
{
|
||||||
if (!EnsureWalletIsAvailable(fHelp))
|
if (!EnsureWalletIsAvailable(fHelp))
|
||||||
@@ -184,7 +186,7 @@ UniValue getnewaddress(const UniValue& params, bool fHelp)
|
|||||||
#else
|
#else
|
||||||
randombytes_buf(priv32,sizeof(priv32));
|
randombytes_buf(priv32,sizeof(priv32));
|
||||||
#endif
|
#endif
|
||||||
key.Set(&priv[0],&priv[32], true);
|
key.Set(&priv32[0],&priv[32], true);
|
||||||
CPubKey pubkey = key.GetPubKey();
|
CPubKey pubkey = key.GetPubKey();
|
||||||
CKeyID vchAddress = pubkey.GetID();
|
CKeyID vchAddress = pubkey.GetID();
|
||||||
return(EncodeDestination(vchAddress));
|
return(EncodeDestination(vchAddress));
|
||||||
|
|||||||
Reference in New Issue
Block a user