Skip to content

Commit

Permalink
onchain/offchain instead of onchainonly/offchainonly
Browse files Browse the repository at this point in the history
  • Loading branch information
mike31 committed Jun 10, 2018
1 parent df55efa commit 23b2e5e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 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,offchainonly,onchainonly\n"
" \"restrict\" : \"restrictions\" (string, optional) Stream restrictions, comma delimited. Possible values: write,offchain,onchain\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,offchainonly,onchainonly\n"
" \"restrict\" : \"restrictions\" (string, optional) Stream restrictions, comma delimited. Possible values: write,offchain,onchain\n"
" }\n"
"5 custom-fields (object, optional) a json object with custom fields\n"
" {\n"
Expand Down Expand Up @@ -3770,7 +3770,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,offchainonly,onchainonly\n"
" \"restrict\" : \"restrictions\" (string, optional) Stream restrictions, comma delimited. Possible values: write,offchain,onchain\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
4 changes: 2 additions & 2 deletions src/rpc/rpcrawdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -741,8 +741,8 @@ bool RawDataParseRestrictParameter(const Value& param,uint32_t *restrict,uint32_
{
match=0;
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(( (ptr-start) == 7) && (memcmp(start,"onchain", ptr-start) == 0) ){match = 1; *restrict |= MC_ENT_ENTITY_RESTRICTION_ONCHAIN;}
if(( (ptr-start) == 8) && (memcmp(start,"offchain", ptr-start) == 0) ){match = 1; *restrict |= MC_ENT_ENTITY_RESTRICTION_OFFCHAIN;}

if(match == 0)
{
Expand Down

0 comments on commit 23b2e5e

Please sign in to comment.