test
This commit is contained in:
34
src/komodo.h
34
src/komodo.h
@@ -22,15 +22,16 @@
|
||||
int32_t IS_KOMODO_NOTARY,USE_EXTERNAL_PUBKEY;
|
||||
std::string NOTARY_PUBKEY;
|
||||
|
||||
int32_t komodo_is_notaryblock(uint8_t *pblock)
|
||||
void komodo_connectblock(CBlock *block)
|
||||
{
|
||||
/*int32_t i;
|
||||
for (i=0; i<5; i++)
|
||||
printf("%02x",coinbase[i]);
|
||||
printf(" <- coinbase\n");
|
||||
for (i=0; i<35; i++)
|
||||
printf("%02x",minerout[i]);
|
||||
printf(" <- minerout\n");*/
|
||||
// update voting results and official (height, notaries[])
|
||||
}
|
||||
|
||||
int32_t komodo_is_notaryblock(CBlockHeader *blockhdr)
|
||||
{
|
||||
// extract height from coinbase
|
||||
// extract miner's pubkey from vout[0]
|
||||
// compare against elected notary pubkeys as of height
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -40,7 +41,22 @@ int32_t komodo_checkmsg(void *bitcoinpeer,uint8_t *data,int32_t datalen)
|
||||
return(0);
|
||||
}
|
||||
|
||||
int32_t komodo_blockcheck(void *block,uint32_t *nBitsp)
|
||||
int32_t komodo_blockhdrcheck(CBlockHeader *blockhdr,uint32_t *nBitsp)
|
||||
{
|
||||
if ( komodo_is_notaryblock(blockhdr) != 0 )
|
||||
*nBitsp = KOMODO_MINDIFF_NBITS;
|
||||
//fprintf(stderr,"check block %p\n",block);
|
||||
// 1 -> valid notary block, change nBits to KOMODO_MINDIFF_NBITS
|
||||
// -1 -> invalid, ie, prior to notarized block
|
||||
return(0); // normal PoW block
|
||||
}
|
||||
|
||||
int32_t komodo_blockindexcheck(CBlockIndex *pindex,uint32_t *nBitsp)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
int32_t komodo_blockcheck(CBlock *block,uint32_t *nBitsp)
|
||||
{
|
||||
//fprintf(stderr,"check block %p\n",block);
|
||||
// 1 -> valid notary block, change nBits to KOMODO_MINDIFF_NBITS
|
||||
|
||||
Reference in New Issue
Block a user