diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index 004ed0d7..4535d64c 100644 --- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@ -241,6 +241,7 @@ static const CRPCCommand vRPCCommands[] = { "newdirectmsg", &newdirectmsg, false, true }, { "newrtmsg", &newrtmsg, false, true }, { "getposts", &getposts, false, true }, + { "setspammsg", &setspammsg, false, true }, }; CRPCTable::CRPCTable() diff --git a/src/bitcoinrpc.h b/src/bitcoinrpc.h index 5d66523d..e39f26e7 100644 --- a/src/bitcoinrpc.h +++ b/src/bitcoinrpc.h @@ -198,5 +198,6 @@ extern json_spirit::Value newpostmsg(const json_spirit::Array& params, bool fHel extern json_spirit::Value newdirectmsg(const json_spirit::Array& params, bool fHelp); extern json_spirit::Value newrtmsg(const json_spirit::Array& params, bool fHelp); extern json_spirit::Value getposts(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value setspammsg(const json_spirit::Array& params, bool fHelp); #endif diff --git a/src/twister.cpp b/src/twister.cpp index 73f91c39..7e513851 100644 --- a/src/twister.cpp +++ b/src/twister.cpp @@ -1138,3 +1138,18 @@ Value getposts(const Array& params, bool fHelp) return ret; } +Value setspammsg(const Array& params, bool fHelp) +{ + if (fHelp || (params.size() != 2)) + throw runtime_error( + "setspammsg \n" + "Set spam message attached to generated blocks"); + + string strUsername = params[0].get_str(); + string strMsg = params[1].get_str(); + + strSpamUser = strUsername; + strSpamMessage = strMsg; + + return Value(); +}