Skip to content

Commit

Permalink
Offchain items tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
mike31 committed Jun 4, 2018
1 parent 4bc4b89 commit ecb3046
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/rpc/rpchelp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1396,7 +1396,7 @@ void mc_InitRPCHelpMap06()
" or \n"
"3. restrictions (object, optional) Stream restrictions\n"
" {\n"
" \"restrict\" : \"restrictions\" (string, optional) Stream restrictions, comma delimited. Possible values: write,offchain,onchain\n"
" \"restrict\" : \"restrictions\" (string, optional) Stream restrictions, comma delimited. Possible values: write,offchainonly,onchainonly\n"
" }\n"
"4 custom-fields (object, optional) a json object with custom fields\n"
" {\n"
Expand Down Expand Up @@ -1443,7 +1443,7 @@ void mc_InitRPCHelpMap06()
" or \n"
"4. restrictions (object, optional) Stream restrictions\n"
" {\n"
" \"restrict\" : \"restrictions\" (string, optional) Stream restrictions, comma delimited. Possible values: write,offchain,onchain\n"
" \"restrict\" : \"restrictions\" (string, optional) Stream restrictions, comma delimited. Possible values: write,offchainonly,onchainonly\n"
" }\n"
"5 custom-fields (object, optional) a json object with custom fields\n"
" {\n"
Expand Down Expand Up @@ -3480,7 +3480,7 @@ void mc_InitRPCHelpMap15()
));

mapHelpStrings.insert(std::make_pair("unsubscribe",
"unsubscribe entity-identifier(s)\n"
"unsubscribe entity-identifier(s) ( purge )\n"
"\nUnsubscribes from the stream.\n"
"\nArguments:\n"
"1. \"stream-identifier\" (string, required) Stream identifier - one of the following: stream txid, stream reference, stream name.\n"
Expand Down Expand Up @@ -3767,7 +3767,7 @@ void mc_InitRPCHelpMap16()
" \"create\" : \"stream\" (string, required) stream\n"
" \"name\" : \"stream-name\" (string, optional) Stream name\n"
" \"open\" : true|false (boolean, optional, default: false) If true, anyone can publish\n"
" \"restrict\" : \"restrictions\" (string, optional) Stream restrictions, comma delimited. Possible values: write,offchain,onchain\n"
" \"restrict\" : \"restrictions\" (string, optional) Stream restrictions, comma delimited. Possible values: write,offchainonly,onchainonly\n"
" \"details\" : (object, optional) A json object with custom fields\n"
" {\n"
" \"param-name\": \"param-value\" (strings, required) The key is the parameter name, the value is parameter value\n"
Expand Down
6 changes: 3 additions & 3 deletions src/rpc/rpcrawdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -740,9 +740,9 @@ bool RawDataParseRestrictParameter(const Value& param,uint32_t *restrict,uint32_
if(ptr > start)
{
match=0;
if(memcmp(start,"write", ptr-start) == 0){match = 1; *permissions |= MC_PTP_WRITE ;}
if(memcmp(start,"onchain", ptr-start) == 0){match = 1; *restrict |= MC_ENT_ENTITY_RESTRICTION_ONCHAIN;}
if(memcmp(start,"offchain", ptr-start) == 0){match = 1; *restrict |= MC_ENT_ENTITY_RESTRICTION_OFFCHAIN;}
if(( (ptr-start) == 5) && (memcmp(start,"write", ptr-start) == 0) ){match = 1; *permissions |= MC_PTP_WRITE ;}
if(( (ptr-start) == 11) && (memcmp(start,"onchainonly", ptr-start) == 0) ){match = 1; *restrict |= MC_ENT_ENTITY_RESTRICTION_ONCHAIN;}
if(( (ptr-start) == 12) && (memcmp(start,"offchainonly", ptr-start) == 0) ){match = 1; *restrict |= MC_ENT_ENTITY_RESTRICTION_OFFCHAIN;}

if(match == 0)
{
Expand Down

0 comments on commit ecb3046

Please sign in to comment.