RPC Browser



Arguments

game_sendupdates "gameid" "fromblock" ( "toblock" )

Requests on-demand block attach/detach notifications to be sent through the game ZMQ interface.

If toblock is not given, it defaults to the current chain tip.

Arguments:
1. gameid       (string, required) The game ID for which to send notifications
2. fromblock    (string, required) Starting block hash
3. toblock      (string, optional) Target block hash

Result:
{                        (json object)
  "toblock" : "hex",     (string) the target block hash to which notifications have been triggered
  "ancestor" : "hex",    (string) hash of the common ancestor that is used
  "reqtoken" : "str",    (string) unique string that is also set in all notifications triggered by this call
  "steps" : {            (json object) number of notifications that will be sent
    "detach" : n,        (numeric) number of block detaches
    "attach" : n         (numeric) number of block attaches
  }
}

Examples:
> spacexpanse-cli game_sendupdates "huc" "e5062d76e5f50c42f493826ac9920b63a8def2626fd70a5cec707ec47a4c4651"
> spacexpanse-cli game_sendupdates "huc" "e5062d76e5f50c42f493826ac9920b63a8def2626fd70a5cec707ec47a4c4651" "206c22b7fb26b24b344b5b238325916c8bae4513302403f9f8efaf8b4c3e61f4"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "game_sendupdates", "params": ["huc", "e5062d76e5f50c42f493826ac9920b63a8def2626fd70a5cec707ec47a4c4651"]}' -H 'content-type: text/plain;' http://127.0.0.1:11998/
[
    {
        "name": "gameid",
        "detailsLines": [],
        "properties": [
            "string",
            "required"
        ],
        "description": "The game ID for which to send notifications"
    },
    {
        "name": "fromblock",
        "detailsLines": [],
        "properties": [
            "string",
            "required"
        ],
        "description": "Starting block hash"
    },
    {
        "name": "toblock",
        "detailsLines": [],
        "properties": [
            "string",
            "optional"
        ],
        "description": "Target block hash"
    }
]