guessing
This commit is contained in:
@@ -78,7 +78,6 @@ public:
|
|||||||
#include "komodo_cJSON.c"
|
#include "komodo_cJSON.c"
|
||||||
#include "komodo_notary.h"
|
#include "komodo_notary.h"
|
||||||
#include "notaries_staked.cpp"
|
#include "notaries_staked.cpp"
|
||||||
#include "cc/CCutils.cpp"
|
|
||||||
|
|
||||||
|
|
||||||
void komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotaries,uint8_t notaryid,uint256 txhash,uint64_t voutmask,uint8_t numvouts,uint32_t *pvals,uint8_t numpvals,int32_t KMDheight,uint32_t KMDtimestamp,uint64_t opretvalue,uint8_t *opretbuf,uint16_t opretlen,uint16_t vout,uint256 MoM,int32_t MoMdepth)
|
void komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotaries,uint8_t notaryid,uint256 txhash,uint64_t voutmask,uint8_t numvouts,uint32_t *pvals,uint8_t numpvals,int32_t KMDheight,uint32_t KMDtimestamp,uint64_t opretvalue,uint8_t *opretbuf,uint16_t opretlen,uint16_t vout,uint256 MoM,int32_t MoMdepth)
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
#include "../script/standard.h"
|
||||||
|
#include "../base58.h"
|
||||||
|
|
||||||
|
bool Getscriptaddress(char *destaddr,const CScript &scriptPubKey)
|
||||||
|
{
|
||||||
|
CTxDestination address; txnouttype whichType;
|
||||||
|
if ( ExtractDestination(scriptPubKey,address) != 0 )
|
||||||
|
{
|
||||||
|
strcpy(destaddr,(char *)CBitcoinAddress(address).ToString().c_str());
|
||||||
|
return(true);
|
||||||
|
}
|
||||||
|
fprintf(stderr,"ExtractDestination failed\n");
|
||||||
|
return(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool pubkey2addr(char *destaddr,uint8_t *pubkey33)
|
||||||
|
{
|
||||||
|
std::vector<uint8_t>pk; int32_t i;
|
||||||
|
for (i=0; i<33; i++)
|
||||||
|
pk.push_back(pubkey33[i]);
|
||||||
|
return(Getscriptaddress(destaddr,CScript() << pk << OP_CHECKSIG));
|
||||||
|
}
|
||||||
|
|||||||
@@ -42,6 +42,8 @@ bool DeserializeF(const std::vector<unsigned char> vIn, T f)
|
|||||||
} catch(...) {}
|
} catch(...) {}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
bool pubkey2addr(char *destaddr,uint8_t *pubkey33);
|
||||||
|
bool Getscriptaddress(char *destaddr,const CScript &scriptPubKey);
|
||||||
|
|
||||||
#define E_MARSHAL(body) SerializeF([&] (CDataStream &ss) {body;})
|
#define E_MARSHAL(body) SerializeF([&] (CDataStream &ss) {body;})
|
||||||
#define E_UNMARSHAL(params, body) DeserializeF(params, [&] (CDataStream &ss) {body;})
|
#define E_UNMARSHAL(params, body) DeserializeF(params, [&] (CDataStream &ss) {body;})
|
||||||
|
|||||||
Reference in New Issue
Block a user