Extra debug for notary stuff
This commit is contained in:
@@ -676,7 +676,7 @@ int32_t hush_is_notarytx(const CTransaction& tx)
|
||||
decode_hex(crypto555,33,(char *)CRYPTO555_PUBSECPSTR);
|
||||
if ( memcmp(ptr+1,crypto555,33) == 0 )
|
||||
{
|
||||
//printf("found notarytx\n");
|
||||
fprintf(stderr,"%s: found notarytx\n", __func__);
|
||||
return(1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,6 +99,11 @@ int32_t hush_notaries(uint8_t pubkeys[64][33],int32_t height,uint32_t timestamp)
|
||||
int32_t hush_season = 0;
|
||||
bool ishush3 = strncmp(SMART_CHAIN_SYMBOL, "HUSH3",5) == 0 ? true : false;
|
||||
hush_season = ishush3 ? gethushseason(height) : getacseason(timestamp);
|
||||
|
||||
if(IS_HUSH_NOTARY) {
|
||||
fprintf(stderr,"%s: [%s] season=%d height=%d time=%d\n", __func__, ishush3 ? "HUSH3" : SMART_CHAIN_SYMBOL, hush_season, height, timestamp);
|
||||
}
|
||||
|
||||
if ( hush_season != 0 )
|
||||
{
|
||||
if ( didinit[hush_season-1] == 0 )
|
||||
|
||||
@@ -1452,8 +1452,12 @@ bool CheckTransaction(uint32_t tiptime,const CTransaction& tx, CValidationState
|
||||
return true;
|
||||
}
|
||||
|
||||
// This is used only in RPC currently but hush_notaries()/gethushseason/getacseason is consensus
|
||||
int32_t hush_isnotaryvout(char *coinaddr,uint32_t tiptime) {
|
||||
int32_t season = getacseason(tiptime);
|
||||
bool ishush3 = strncmp(SMART_CHAIN_SYMBOL, "HUSH3",5) == 0 ? true : false;
|
||||
int32_t height = chainActive.LastTip()->GetHeight();
|
||||
int32_t season = ishush3 ? gethushseason(height) : getacseason(tiptime);
|
||||
fprintf(stderr,"%s: season=%d, tiptime=%d\n", __func__, season,tiptime);
|
||||
if ( NOTARY_ADDRESSES[season-1][0][0] == 0 ) {
|
||||
uint8_t pubkeys[64][33];
|
||||
hush_notaries(pubkeys,0,tiptime);
|
||||
|
||||
Reference in New Issue
Block a user