Constant cuprate_test_utils::rpc::data::json::ADD_AUX_POW_REQUEST

source ยท
pub const ADD_AUX_POW_REQUEST: &str = r#"{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "add_aux_pow",
  "params": {
    "blocktemplate_blob": "1010f4bae0b4069d648e741d85ca0e7acb4501f051b27e9b107d3cd7a3f03aa7f776089117c81a0000000002c681c30101ff8a81c3010180e0a596bb11033b7eedf47baf878f3490cb20b696079c34bd017fe59b0d070e74d73ffabc4bb0e05f011decb630f3148d0163b3bd39690dde4078e4cfb69fecf020d6278a27bad10c58023c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "aux_pow": [{
      "id": "3200b4ea97c3b2081cd4190b58e49572b2319fed00d030ad51809dff06b5d8c8",
      "hash": "7b35762de164b20885e15dbe656b1138db06bb402fa1796f5765a23933d8859a"
    }]
  }
}"#;
Expand description

Documentation, response.

use cuprate_test_utils::rpc::data::json::*;
use serde_json::{to_value, Value};

let value = serde_json::from_str::<Value>(&ADD_AUX_POW_REQUEST).unwrap();
let Value::Object(map) = value else {
    panic!();
};

assert_eq!(map.get("jsonrpc").unwrap(), "2.0");
map.get("id").unwrap();

if map.get("method").is_some() {
    return;
}

if map.get("result").is_none() {
    map.get("error").unwrap();
}