komodo_netevent
This commit is contained in:
@@ -48,6 +48,10 @@ std::string MYCCLIBNAME = (char *)"rogue";
|
|||||||
std::string MYCCLIBNAME = (char *)"sudoku";
|
std::string MYCCLIBNAME = (char *)"sudoku";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef BUILD_GAMESCC
|
||||||
|
void komodo_netevent(std::vector<uint8_t> payload) {}
|
||||||
|
#endif
|
||||||
|
|
||||||
char *CClib_name() { return((char *)MYCCLIBNAME.c_str()); }
|
char *CClib_name() { return((char *)MYCCLIBNAME.c_str()); }
|
||||||
|
|
||||||
struct CClib_rpcinfo
|
struct CClib_rpcinfo
|
||||||
|
|||||||
@@ -178,6 +178,14 @@ UniValue games_register(uint64_t txfee,struct CCcontract_info *cp,cJSON *params)
|
|||||||
return(result);
|
return(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void komodo_netevent(std::vector<uint8_t> payload)
|
||||||
|
{
|
||||||
|
int32_t i;
|
||||||
|
for (i=0; i<payload.size(); i++)
|
||||||
|
fprintf(stderr,"%02x",payload[i]);
|
||||||
|
fprintf(stderr," got event[%d]\n",(int32_t)payload.size());
|
||||||
|
}
|
||||||
|
|
||||||
bool games_validate(struct CCcontract_info *cp,int32_t height,Eval *eval,const CTransaction tx)
|
bool games_validate(struct CCcontract_info *cp,int32_t height,Eval *eval,const CTransaction tx)
|
||||||
{
|
{
|
||||||
return(true);
|
return(true);
|
||||||
|
|||||||
@@ -81,5 +81,6 @@ extern int32_t USE_EXTERNAL_PUBKEY;
|
|||||||
int tx_height( const uint256 &hash );
|
int tx_height( const uint256 &hash );
|
||||||
extern char NOTARYADDRS[64][36];
|
extern char NOTARYADDRS[64][36];
|
||||||
extern uint8_t NUM_NOTARIES;
|
extern uint8_t NUM_NOTARIES;
|
||||||
|
void komodo_netevent(std::vector<uint8_t> payload);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -7045,9 +7045,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
|
|||||||
}
|
}
|
||||||
std::vector<uint8_t> payload;
|
std::vector<uint8_t> payload;
|
||||||
vRecv >> payload;
|
vRecv >> payload;
|
||||||
for (i=0; i<payload.size(); i++)
|
komodo_netevent(payload);
|
||||||
fprintf(stderr,"%02x",payload[i]);
|
|
||||||
fprintf(stderr," got event[%d]\n",(int32_t)payload.size());
|
|
||||||
return(true);
|
return(true);
|
||||||
}
|
}
|
||||||
else if (strCommand == "verack")
|
else if (strCommand == "verack")
|
||||||
|
|||||||
Reference in New Issue
Block a user