|
|
@ -1257,10 +1257,9 @@ Value getposts(const Array& params, bool fHelp) |
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
LOCK(cs_twister); |
|
|
|
LOCK(cs_twister); |
|
|
|
if( m_receivedSpamMsgStr.length() ) { |
|
|
|
|
|
|
|
// we must agree on an acceptable level here
|
|
|
|
// we must agree on an acceptable level here
|
|
|
|
// what about one every eight hours? (not cumulative)
|
|
|
|
// what about one every eight hours? (not cumulative)
|
|
|
|
if( GetAdjustedTime() > m_lastSpamTime + (8*3600) ) { |
|
|
|
if( m_receivedSpamMsgStr.length() && GetAdjustedTime() > m_lastSpamTime + (8*3600) ) { |
|
|
|
m_lastSpamTime = GetAdjustedTime(); |
|
|
|
m_lastSpamTime = GetAdjustedTime(); |
|
|
|
|
|
|
|
|
|
|
|
entry v; |
|
|
|
entry v; |
|
|
@ -1277,7 +1276,7 @@ Value getposts(const Array& params, bool fHelp) |
|
|
|
RAND_bytes(vchSig,sizeof(vchSig)); |
|
|
|
RAND_bytes(vchSig,sizeof(vchSig)); |
|
|
|
v["sig_userpost"] = std::string((const char *)vchSig, sizeof(vchSig)); |
|
|
|
v["sig_userpost"] = std::string((const char *)vchSig, sizeof(vchSig)); |
|
|
|
ret.insert(ret.begin(),entryToJson(v)); |
|
|
|
ret.insert(ret.begin(),entryToJson(v)); |
|
|
|
} |
|
|
|
|
|
|
|
m_receivedSpamMsgStr = ""; |
|
|
|
m_receivedSpamMsgStr = ""; |
|
|
|
m_receivedSpamUserStr = ""; |
|
|
|
m_receivedSpamUserStr = ""; |
|
|
|
} |
|
|
|
} |
|
|
|